Skip to content

Commit 61f3832

Browse files
authored
Merge pull request #147 from optimizely/master
Merge Master on to 2.0.x for beta release
2 parents cfabaee + f4228f3 commit 61f3832

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+5685
-924
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: java
2+
dist: trusty
23
jdk:
3-
- openjdk7
4-
- oraclejdk7
4+
- openjdk8
55
- oraclejdk8
6+
- oraclejdk9
67
install: true
78
script:
89
- "./gradlew clean"
@@ -20,4 +21,4 @@ cache:
2021
branches:
2122
only:
2223
- master
23-
- /^\d+\.\d+\.\d+(-SNAPSHOT|-alpha)?$/ # trigger builds on tags which are semantically versioned to ship the SDK.
24+
- /^\d+\.\d+\.\d+(-SNAPSHOT|-alpha|-beta)?$/ # trigger builds on tags which are semantically versioned to ship the SDK.

CHANGELOG.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,63 @@
1-
## 2.0.0
1+
# Optimizely Java X SDK Changelog
2+
## 2.0.0 Beta
3+
September 29, 2017
4+
5+
This release is a beta release supporting feature flags and rollouts.
6+
7+
### New Features
8+
#### Feature Flag Accessors
9+
You can now use feature flags in the Java SDK. You can experiment on features and rollout features through the Optimizely UI.
10+
11+
- `isFeatureEnabled`
12+
- `getFeatureVariableBoolean`
13+
- `getFeatureVariableDouble`
14+
- `getFeatureVariableInteger`
15+
- `getFeatureVariableString`
16+
17+
### Breaking Changes
18+
19+
- Remove Live Variables accessors
20+
- `getVariableString`
21+
- `getVariableBoolean`
22+
- `getVariableInteger`
23+
- `getVariableDouble`
24+
- Remove track with revenue as a parameter. Pass the revenue value as an event tag instead
25+
- `track(String, String, long)`
26+
- `track(String, String, Map<String, String>, long)`
27+
- We will no longer run all unit tests in travis-ci against Java 7.
28+
We will still continue to set `sourceCompatibility` and `targetCompatibility` to 1.6 so that we build for Java 6.
29+
30+
## 1.8.0
31+
32+
August 29, 2017
33+
34+
This release adds support for numeric metrics and forced bucketing (in code as opposed to whitelisting via project file).
35+
36+
### New Features
37+
38+
- Added `setForcedVariation` and `getForcedVariation`
39+
- Added any numeric metric to event metrics.
40+
41+
### Breaking Changes
42+
43+
- Nothing breaking from 1.7.0
44+
45+
## 1.7.0
46+
47+
July 12, 2017
48+
49+
This release will support Android SDK release 1.4.0
50+
51+
### New Features
52+
53+
- Added `UserProfileService` interface to allow for sticky bucketing
54+
55+
### Breaking Changes
56+
57+
- Removed `UserProfile` interface. Replaced with `UserProfileService` interface.
58+
- Removed support for v1 datafiles.
59+
60+
## 2.0.0-alpha
261

362
May 19, 2017
463

@@ -110,4 +169,4 @@ August 29, 2016
110169

111170
July 26, 2016
112171

113-
- Beta release of the Java SDK for server-side testing
172+
- Beta release of the Java SDK for server-side testing

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Optimizely Java SDK
22
===================
33
[![Build Status](https://travis-ci.org/optimizely/java-sdk.svg?branch=master)](https://travis-ci.org/optimizely/java-sdk)
4-
[![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0)
4+
[![Apache 2.0](https://img.shields.io/badge/license-APACHE%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
55

66
This repository houses the Java SDK for Optimizely's Full Stack product.
77

build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
}
1313

1414
plugins {
15-
id 'nebula.optional-base' version '3.0.3'
15+
id 'nebula.optional-base' version '3.2.0'
1616
id 'me.champeau.gradle.jmh' version '0.3.1'
1717
}
1818

@@ -37,7 +37,6 @@ subprojects {
3737
apply plugin: 'jacoco'
3838
apply plugin: 'maven-publish'
3939
apply plugin: 'me.champeau.gradle.jmh'
40-
apply plugin: 'nebula.provided-base'
4140
apply plugin: 'nebula.optional-base'
4241

4342
sourceCompatibility = 1.6
@@ -108,6 +107,11 @@ subprojects {
108107
// logging dependencies (logback)
109108
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: logbackVersion
110109
testCompile group: 'ch.qos.logback', name: 'logback-core', version: logbackVersion
110+
111+
testCompile group: 'com.google.code.gson', name: 'gson', version: gsonVersion
112+
testCompile group: 'org.json', name: 'json', version: jsonVersion
113+
testCompile group: 'com.googlecode.json-simple', name: 'json-simple', version: jsonSimpleVersion
114+
testCompile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion
111115
}
112116

113117
publishing {
@@ -172,7 +176,3 @@ task ship() {
172176
dependsOn(':core-api:ship', ':core-httpclient-impl:ship')
173177
}
174178

175-
// todo: remove this wrapper version once we're publishing to jcenter/maven central
176-
task wrapper(type: Wrapper) {
177-
distributionUrl = gradleWrapperUrl
178-
}

core-api/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ dependencies {
22
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
33
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jacksonVersion
44

5-
provided group: 'com.google.code.findbugs', name: 'annotations', version: findbugsVersion
6-
provided group: 'com.google.code.findbugs', name: 'jsr305', version: findbugsVersion
5+
compile group: 'com.google.code.findbugs', name: 'annotations', version: findbugsVersion
6+
compile group: 'com.google.code.findbugs', name: 'jsr305', version: findbugsVersion
77

88
// an assortment of json parsers
9-
provided group: 'com.google.code.gson', name: 'gson', version: gsonVersion, optional
10-
provided group: 'org.json', name: 'json', version: jsonVersion, optional
11-
provided group: 'com.googlecode.json-simple', name: 'json-simple', version: jsonSimpleVersion, optional
12-
provided group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion, optional
9+
compileOnly group: 'com.google.code.gson', name: 'gson', version: gsonVersion, optional
10+
compileOnly group: 'org.json', name: 'json', version: jsonVersion, optional
11+
compileOnly group: 'com.googlecode.json-simple', name: 'json-simple', version: jsonSimpleVersion, optional
12+
compileOnly group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion, optional
1313
}
1414

1515
task generateVersionFile {

core-api/src/jmh/java/com/optimizely/ab/OptimizelyBenchmark.java

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -157,49 +157,27 @@ public Variation measureActivateForGroupExperimentWithForcedVariation() {
157157
}
158158

159159
@Benchmark
160-
public void measureTrackWithNoAttributesAndNoRevenue() {
160+
public void measureTrackWithNoAttributes() {
161161
optimizely.track("testEventWithMultipleExperiments", "optimizely_user" + random.nextInt());
162162
}
163163

164164
@Benchmark
165-
public void measureTrackWithNoAttributesAndRevenue() {
166-
optimizely.track("testEventWithMultipleExperiments", "optimizely_user" + random.nextInt(), 50000);
167-
}
168-
169-
@Benchmark
170-
public void measureTrackWithAttributesAndNoRevenue() {
165+
public void measureTrackWithAttributes() {
171166
optimizely.track("testEventWithMultipleExperiments", "optimizely_user" + random.nextInt(),
172167
Collections.singletonMap("browser_type", "firefox"));
173168
}
174169

175170
@Benchmark
176-
public void measureTrackWithAttributesAndRevenue() {
177-
optimizely.track("testEventWithMultipleExperiments", "optimizely_user" + random.nextInt(),
178-
Collections.singletonMap("browser_type", "firefox"), 50000);
179-
}
180-
181-
@Benchmark
182-
public void measureTrackWithGroupExperimentsNoAttributesNoRevenue() {
171+
public void measureTrackWithGroupExperimentsNoAttributes() {
183172
optimizely.track("testEventWithMultipleExperiments", trackGroupExperimentUserId);
184173
}
185174

186175
@Benchmark
187-
public void measureTrackWithGroupExperimentsNoAttributesAndRevenue() {
188-
optimizely.track("testEventWithMultipleExperiments", trackGroupExperimentUserId, 50000);
189-
}
190-
191-
@Benchmark
192-
public void measureTrackWithGroupExperimentsNoRevenueAndAttributes() {
176+
public void measureTrackWithGroupExperimentsAndAttributes() {
193177
optimizely.track("testEventWithMultipleExperiments", trackGroupExperimentAttributesUserId,
194178
Collections.singletonMap("browser_type", "chrome"));
195179
}
196180

197-
@Benchmark
198-
public void measureTrackWithGroupExperimentsAndAttributesAndRevenue() {
199-
optimizely.track("testEventWithMultipleExperiments", trackGroupExperimentAttributesUserId,
200-
Collections.singletonMap("browser_type", "chrome"), 50000);
201-
}
202-
203181
@Benchmark
204182
public void measureTrackWithGroupExperimentsAndForcedVariation() {
205183
optimizely.track("testEventWithMultipleExperiments", "user_a");

0 commit comments

Comments
 (0)