All Projects → optimizely → java-sdk

optimizely / java-sdk

Licence: Apache-2.0 license
Optimizely Full Stack Java SDK

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to java-sdk

react-sdk
React SDK for Optimizely Full Stack and Optimizely Rollouts
Stars: ✭ 81 (+138.24%)
Mutual labels:  optimizely-environment-prod, optimizely-environment-public
agent
Optimizely X Full Stack Agent
Stars: ✭ 22 (-35.29%)
Mutual labels:  optimizely-environment-prod, optimizely-environment-public
android-sdk
Optimizely X Android SDK
Stars: ✭ 50 (+47.06%)
Mutual labels:  optimizely-environment-prod, optimizely-environment-public
javascript-sdk
JavaScript SDK for Optimizely Full Stack
Stars: ✭ 64 (+88.24%)
Mutual labels:  optimizely-environment-prod, optimizely-environment-public
objective-c-sdk
Optimizely X Objective-C SDK for iOS and tvOS
Stars: ✭ 23 (-32.35%)
Mutual labels:  optimizely-environment-prod, optimizely-environment-public
csharp-sdk
This repository houses the .Net based C# SDK for Optimizely Full Stack.
Stars: ✭ 18 (-47.06%)
Mutual labels:  optimizely-environment-prod, optimizely-environment-public

Optimizely Java SDK

Build Status Apache 2.0

This repository houses the Java SDK for use with Optimizely Full Stack and Optimizely Rollouts.

Optimizely Full Stack is A/B testing and feature flag management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/platform/full-stack/, or see the documentation.

Optimizely Rollouts is free feature flags for development teams. Easily roll out and roll back features in any application without code deploys. Mitigate risk for every feature on your roadmap. Learn more at https://www.optimizely.com/rollouts/, or see the documentation.

Getting Started

Installing the SDK

Gradle

The Java SDK is distributed through Maven Central and is created with source and target compatibility of Java 1.8. The core-api and httpclient packages are optimizely-sdk-core-api and optimizely-sdk-httpclient, respectively.


NOTE

Optimizely previously distributed the Java SDK through Bintray/JCenter. But, as of April 27, 2021, Bintray/JCenter will become a read-only repository indefinitely. The publish repository has been migrated to MavenCentral for the SDK version 3.8.1 or later.


repositories {
  mavenCentral()
  jcenter()
}

dependencies {
  compile 'com.optimizely.ab:core-api:{VERSION}'
  compile 'com.optimizely.ab:core-httpclient-impl:{VERSION}'
  // The SDK integrates with multiple JSON parsers, here we use
  // Jackson.
  compile 'com.fasterxml.jackson.core:jackson-core:2.7.1'
  compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.1'
  compile 'com.fasterxml.jackson.core:jackson-databind:2.7.1'
}

Dependencies

core-api requires org.slf4j:slf4j-api:1.7.16 and a supported JSON parser. We currently integrate with Jackson, GSON, json.org, and json-simple; if any of those packages are available at runtime, they will be used by core-api. If none of those packages are already provided in your project's classpath, one will need to be added. core-httpclient-impl is an optional dependency that implements the event dispatcher and requires org.apache.httpcomponents:httpclient:4.5.2. The supplied pom files on Bintray define module dependencies.

Feature Management Access

To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.

Using the SDK

See the Optimizely Full Stack developer documentation to learn how to set up your first Java project and use the SDK.

Development

Building the SDK

To build local jars which are outputted into the respective modules' build/lib directories:

./gradlew build

Unit tests

Running all tests

You can run all unit tests with:

./gradlew test

Checking for bugs

We utilize FindBugs to identify possible bugs in the SDK. To run the check:

./gradlew check

Benchmarking

JMH benchmarks can be run through gradle:

./gradlew core-api:jmh

Results are generated in $buildDir/reports/jmh.

Contributing

Please see CONTRIBUTING.

Credits

First-party code (under core-api/ and core-httpclient-impl) is copyright Optimizely, Inc. and contributors, licensed under Apache 2.0.

Additional Code

This software incorporates code from the following open source projects:

core-api module

SLF4J https://www.slf4j.org
Copyright © 2004-2017 QOS.ch
License (MIT): https://www.slf4j.org/license.html

Jackson Annotations https://github.com/FasterXML/jackson-annotations
License (Apache 2.0): https://github.com/FasterXML/jackson-annotations/blob/master/src/main/resources/META-INF/LICENSE

Gson https://github.com/google/gson
Copyright © 2008 Google Inc. License (Apache 2.0): https://github.com/google/gson/blob/master/LICENSE

JSON-java https://github.com/stleary/JSON-java
Copyright © 2002 JSON.org License (The JSON License): https://github.com/stleary/JSON-java/blob/master/LICENSE

JSON.simple https://code.google.com/archive/p/json-simple/
Copyright © January 2004
License (Apache 2.0): https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt

Jackson Databind https://github.com/FasterXML/jackson-databind
License (Apache 2.0): https://github.com/FasterXML/jackson-databind/blob/master/src/main/resources/META-INF/LICENSE

core-httpclient-impl module

Gson https://github.com/google/gson
Copyright © 2008 Google Inc. License (Apache 2.0): https://github.com/google/gson/blob/master/LICENSE

Apache HttpClient https://hc.apache.org/httpcomponents-client-ga/index.html
Copyright © January 2004 License (Apache 2.0): https://github.com/apache/httpcomponents-client/blob/master/LICENSE.txt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].