growthbook / growthbook

Open Source Feature Flagging and A/B Testing Platform
https://www.growthbook.io
Other
5.99k stars 484 forks source link

Java SDK support #338

Closed janko-sokolovic closed 1 year ago

janko-sokolovic commented 2 years ago

What are the plans for including JVM SDK?

thangpham7793 commented 2 years ago

Piggy-backing @janko-sokolovic any plans for .NET as well?

darklordzw commented 2 years ago

I recently finished a .NET port of the SDK! You can find it below:

NuGet link: https://www.nuget.org/packages/growthbook-c-sharp/ GitHub repo: https://github.com/darklordzw/growthbook-c-sharp

The port was pretty straightforward, didn't take very long. If anyone wants to tackle a Java port, the .NET one might be a good reference to get you started.

DNAlchemist commented 2 years ago

@janko-sokolovic I am using Kotlin SDK from Java. Is this option not suitable? For some reason it is written that it is for Android, I really do not understand why yet.

janko-sokolovic commented 2 years ago

@DNAlchemist are you using it for a backend server (aka arbitrary JVM-based application) or specifically client Android app? I think there would be some issues if for instance you would use android's lib for a Spring app, for instance.

bpoweski commented 2 years ago

We have the same need - a JVM based client library.

janko-sokolovic commented 2 years ago

I've hacked out a port for backend usage from android code. Testing it a bit now. Will try to clean it up a bit and propose a PR

DNAlchemist commented 1 year ago

@bpoweski @janko-sokolovic SDK for java was published by Growthbook team https://docs.growthbook.io/lib/java

tinahollygb commented 1 year ago

We now have a Java SDK that works on the JVM and on Android. There are code examples in Android Java, Java Spring, and Kotlin with Ktor. See the docs and the code examples linked at the bottom of the page: https://docs.growthbook.io/lib/java