dazzling-garden-98992
03/22/2023, 2:21 PMGBContext context = GBContext.builder()
.featuresJson(featuresJson)
.attributesJson(userAttributesObj.toString()) // Optional
.encryptionKey("****") // You may want to store this in an environment variable
.trackingCallback(trackingCallback)
.build();
GrowthBook growthBook = new GrowthBook(context);
But when I check https://github.com/growthbook/growthbook-kotlin , I see this:
var sdkInstance: GrowthBookSDK = GBSDKBuilderJAVA(apiKey = <API_KEY>,
hostURL = <GrowthBook_URL>,
attributes = <Hashmap>,
features = <Hashmap>,
trackingCallback = { gbExperiment, gbExperimentResult ->
}).initialize()
The sample from <http://app.growthbook.io|app.growthbook.io>
uses GBContext
and has no API key, while the github sample uses GBSDKBuilderJAVA
and requires an API key. Which is correct?most-spoon-61816
03/22/2023, 5:13 PMdazzling-garden-98992
03/22/2023, 6:37 PMdazzling-garden-98992
03/22/2023, 7:59 PMmaven {
url = uri("<https://jitpack.io>")
}
com.github.growthbook:growthbook-sdk-java:0.3.0
Or
io.growthbook.sdk:GrowthBook-jvm:1.1.27
Which one is it for a server side Kotlin app?
@fresh-football-47124 @helpful-application-7107better-magician-65629
03/22/2023, 8:15 PMmaven {
url = uri("<https://jitpack.io>")
}
com.github.growthbook:growthbook-sdk-java:0.3.0
it can be used both in java and in kotlin.
the growthbook-kotlin project is android only and would not be compatible.
⢠here are the docs for the java SDK: https://docs.growthbook.io/lib/java ā at the bottom there are some examples (java spring, kotlin with ktor)
⢠here's the repository: https://github.com/growthbook/growthbook-sdk-java
please note, the latest version of the java SDK is now 0.5.0. you may want to choose version 0.4.0 and up if you'd like networking support.dazzling-garden-98992
03/23/2023, 10:48 PMOpen source platform for stress free deployments, measured impact, and smarter decisions.
Powered by