8000 patches cherry-picked · optimizely/java-sdk@29dcf99 · GitHub
[go: up one dir, main page]

Skip to content

Commit 29dcf99

Browse files
committed
patches cherry-picked
1 parent 0248dda commit 29dcf99

File tree

3 files changed

+85
-52
lines changed

3 files changed

+85
-52
lines changed

README.md

Lines changed: 81 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
1-
Optimizely Java SDK
2-
===================
1+
# Optimizely Java SDK
2+
33
[![Build Status](https://travis-ci.org/optimizely/java-sdk.svg?branch=master)](https://travis-ci.org/optimizely/java-sdk)
44
[![Apache 2.0](https://img.shields.io/badge/license-APACHE%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
55

6-
This repository houses the Java SDK for use with Optimizely Full Stack and Optimizely Rollouts.
6+
This repository houses the Java SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy).
7+
8+
Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams that enables you to experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome).
9+
10+
Optimizely Rollouts is [free feature flags](https://www.optimizely.com/free-feature-flagging/) for development teams. You can easily roll out and roll back features in any application without code deploys, mitigating risk for every feature on your roadmap.
11+
12+
## Get started
713

8-
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](https://docs.developers.optimizely.com/full-stack/docs).
14+
Refer to the [Java SDK's developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/java-sdk) for detailed instructions on getting started with using the SDK.
915

10-
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](https://docs.developers.optimizely.com/rollouts/docs).
16+
### Requirements
1117

18+
Java 8 or higher versions.
1219

13-
## Getting Started
20+
### Install the SDK
1421

15-
### Installing the SDK
22+
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](https://mvnrepository.com/artifact/com.optimizely.ab/core-api) and [optimizely-sdk-httpclient](https://mvnrepository.com/artifact/com.optimizely.ab/core-httpclient-impl), respectively.
1623

17-
#### Gradle
1824

19-
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](https://mvnrepository.com/artifact/com.optimizely.ab/core-api) and [optimizely-sdk-httpclient](https://mvnrepository.com/artifact/com.optimizely.ab/core-httpclient-impl), respectively.
25+
`core-api` requires [org.slf4j:slf4j-api:1.7.16](https://mvnrepository.com/artifact/org.slf4j/slf4j-api/1.7.16) and a supported JSON parser.
26+
We currently integrate with [Jackson](https://github.com/FasterXML/jackson), [GSON](https://github.com/google/gson), [json.org](http://www.json.org), and [json-simple](https://code.google.com/archive/p/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.
27+
28+
`core-httpclient-impl` is an optional dependency that implements the event dispatcher and requires [org.apache.httpcomponents:httpclient:4.5.2](https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.2).
2029

2130
---
31+
2232
**NOTE**
2333

2434
Optimizely previously distributed the Java SDK through Bintray/JCenter. But, as of April 27, 2021, [Bintray/JCenter will become a read-only repository indefinitely](https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/). The publish repository has been migrated to [MavenCentral](https://mvnrepository.com/artifact/com.optimizely.ab) for the SDK version 3.8.1 or later.
2535

2636
---
2737

28-
2938
```
3039
repositories {
3140
mavenCentral()
@@ -35,65 +44,49 @@ repositories {
3544
dependencies {
3645
compile 'com.optimizely.ab:core-api:{VERSION}'
3746
compile 'com.optimizely.ab:core-httpclient-impl:{VERSION}'
38-
// The SDK integrates with multiple JSON parsers, here we use
39-
// Jackson.
47+
// The SDK integrates with multiple JSON parsers, here we use Jackson.
4048
compile 'com.fasterxml.jackson.core:jackson-core:2.7.1'
4149
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.1'
4250
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.1'
4351
}
44-
```
45-
46-
#### Dependencies
47-
48-
`core-api` requires [org.slf4j:slf4j-api:1.7.16](https://mvnrepository.com/artifact/org.slf4j/slf4j-api/1.7.16) and a supported JSON parser.
49-
We currently integrate with [Jackson](https://github.com/FasterXML/jackson), [GSON](https://github.com/google/gson), [json.org](http://www.json.org),
50-
and [json-simple](https://code.google.com/archive/p/json-simple); if any of those packages are available at runtime, they will be used by `core-api`.
51-
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
52-
dependency that implements the event dispatcher and requires [org.apache.httpcomponents:httpclient:4.5.2](https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.2).
53-
The supplied `pom` files on Bintray define module dependencies.
54-
55-
### Feature Management Access
56-
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.
52+
```
5753

58-
### Using the SDK
5954

60-
See the Optimizely Full Stack [developer documentation](http://developers.optimizely.com/server/reference/index.html) to learn how to set
61-
up your first Java project and use the SDK.
55+
## Use the Java SDK
6256

63-
## Development
57+
See the Optimizely Feature Experimentation [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0-full-stack/docs/java-sdk) to learn how to set up your first Java project and use the SDK.
6458

65-
### Building the SDK
6659

67-
To build local jars which are outputted into the respective modules' `build/lib` directories:
68-
69-
```
70-
./gradlew build
71-
```
60+
## SDK Development
7261

7362
### Unit tests
7463

75-
#### Running all tests
76-
7764
You can run all unit tests with:
7865

7966
```
67+
8068
./gradlew test
69+
8170
```
8271

8372
### Checking for bugs
8473

8574
We utilize [FindBugs](http://findbugs.sourceforge.net/) to identify possible bugs in the SDK. To run the check:
8675

8776
```
77+
8878
./gradlew check
79+
8980
```
9081

9182
### Benchmarking
9283

9384
[JMH](http://openjdk.java.net/projects/code-tools/jmh/) benchmarks can be run through gradle:
9485

9586
```
87+
9688
./gradlew core-api:jmh
89+
9790
```
9891

9992
Results are generated in `$buildDir/reports/jmh`.
@@ -112,34 +105,74 @@ This software incorporates code from the following open source projects:
112105

113106
#### core-api module
114107

115-
**SLF4J** [https://www.slf4j.org ](https://www.slf4j.org)
116-
Copyright © 2004-2017 QOS.ch
108+
**SLF4J** [https://www.slf4j.org ](https://www.slf4j.org)
109+
110+
Copyright © 2004-2017 QOS.ch
111+
117112
License (MIT): [https://www.slf4j.org/license.html](https://www.slf4j.org/license.html)
118113

119-
**Jackson Annotations** [https://github.com/FasterXML/jackson-annotations](https://github.com/FasterXML/jackson-annotations)
114+
**Jackson Annotations** [https://github.com/FasterXML/jackson-annotations](https://github.com/FasterXML/jackson-annotations)
115+
120116
License (Apache 2.0): [https://github.com/FasterXML/jackson-annotations/blob/master/src/main/resources/META-INF/LICENSE](https://github.com/FasterXML/jackson-annotations/blob/master/src/main/resources/META-INF/LICENSE)
121117

122-
**Gson** [https://github.com/google/gson ](https://github.com/google/gson)
118+
**Gson** [https://github.com/google/gson ](https://github.com/google/gson)
119+
123120
Copyright © 2008 Google Inc.
121+
124122
License (Apache 2.0): [https://github.com/google/gson/blob/master/LICENSE](https://github.com/google/gson/blob/master/LICENSE)
125123

126-
**JSON-java** [https://github.com/stleary/JSON-java](https://github.com/stleary/JSON-java)
127-
Copyright © 2002 JSON.org
124+
**JSON-java** [https://github.com/stleary/JSON-java](https://github.com/stleary/JSON-java)
125+
126+
Copyright © 2002 JSON.org
127+
128128
License (The JSON License): [https://github.com/stleary/JSON-java/blob/master/LICENSE](https://github.com/stleary/JSON-java/blob/master/LICENSE)
129129

130-
**JSON.simple** [https://code.google.com/archive/p/json-simple/](https://code.google.com/archive/p/json-simple/)
131-
Copyright © January 2004
130+
**JSON.simple** [https://code.google.com/archive/p/json-simple/](https://code.google.com/archive/p/json-simple/)
131+
132+
Copyright © January 2004
133+
132134
License (Apache 2.0): [https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt](https://github.com/fangyidong/json-simple/blob/master/LICENSE.txt)
133135

134-
**Jackson Databind** [https://github.com/FasterXML/jackson-databind](https://github.com/FasterXML/jackson-databind)
136+
**Jackson Databind** [https://github.com/FasterXML/jackson-databind](https://github.com/FasterXML/jackson-databind)
137+
135138
License (Apache 2.0): [https://github.com/FasterXML/jackson-databind/blob/master/src/main/resources/META-INF/LICENSE](https://github.com/FasterXML/jackson-databind/blob/master/src/main/resources/META-INF/LICENSE)
136139

137140
#### core-httpclient-impl module
138141

139-
**Gson** [https://github.com/google/gson ](https://github.com/google/gson)
142+
**Gson** [https://github.com/google/gson ](https://github.com/google/gson)
143+
140144
Copyright © 2008 Google Inc.
145+
141146
License (Apache 2.0): [https://github.com/google/gson/blob/master/LICENSE](https://github.com/google/gson/blob/master/LICENSE)
142147

143-
**Apache HttpClient** [https://hc.apache.org/httpcomponents-client-ga/index.html ](https://hc.apache.org/httpcomponents-client-ga/index.html)
148+
**Apache HttpClient** [https://hc.apache.org/httpcomponents-client-ga/index.html ](https://hc.apache.org/httpcomponents-client-ga/index.html)
149+
144150
Copyright © January 2004
151+
145152
License (Apache 2.0): [https://github.com/apache/httpcomponents-client/blob/master/LICENSE.txt](https://github.com/apache/httpcomponents-client/blob/master/LICENSE.txt)
153+
154+
### Other Optimzely SDKs
155+
156+
- Agent - https://github.com/optimizely/agent
157+
158+
- Android - https://github.com/optimizely/android-sdk
159+
160+
- C# - https://github.com/optimizely/csharp-sdk
161+
162+
- Flutter - https://github.com/optimizely/optimizely-flutter-sdk
163+
164+
- Go - https://github.com/optimizely/go-sdk
165+
166+
- Java - https://github.com/optimizely/java-sdk
167+
168+
- JavaScript - https://github.com/optimizely/javascript-sdk
169+
170+
- PHP - https://github.com/optimizely/php-sdk
171+
172+
- Python - https://github.com/optimizely/python-sdk
173+
174+
- React - https://github.com/optimizely/react-sdk
175+
176+
- Ruby - https://github.com/optimizely/ruby-sdk
177+
178+
- Swift - https://github.com/optimizely/swift-sdk

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def customizePom(pom, title) {
223223

224224
name title
225225
url 'https://github.com/optimizely/java-sdk'
226-
description 'The Java SDK for Optimizely Full Stack (feature flag management for product development teams)'
226+
description 'The Java SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts'
227227
licenses {
228228
license {
229229
name 'The Apache Software License, Version 2.0'

core-api/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Java SDK Core API
2-
This package contains the core APIs and interfaces for the Optimizely Full Stack API in Java.
2+
This package contains the core APIs and interfaces for the Optimizely Feature Experimentation API in Java.
33

4-
Full product documentation is in the [Optimizely developers documentation](https://docs.developers.optimizely.com/full-stack/docs/welcome).
4+
Full product documentation is in the [Optimizely developers documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome).
55

66
## Installation
77

@@ -22,7 +22,7 @@ compile 'com.optimizely.ab:core-api:{VERSION}'
2222

2323
## Optimizely
2424
[`Optimizely`](https://github.com/optimizely/java-sdk/blob/master/core-api/src/main/java/com/optimizely/ab/Optimizely.java)
25-
provides top level API access to the Full Stack project.
25+
provides top level API access to the Feature Experimentation project.
2626

2727
### Usage
2828
```Java

0 commit comments

Comments
 (0)
0