Skip to content

Commit 92bff91

Browse files
integrate with optimizely java sdk 1.9
1 parent 94ee813 commit 92bff91

File tree

6 files changed

+30
-6
lines changed

6 files changed

+30
-6
lines changed

android-sdk/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ dependencies {
6262
compile project(':datafile-handler')
6363
compile project(':event-handler')
6464
compile project(':user-profile')
65-
compile "com.optimizely.ab:core-api:$java_core_ver"
65+
compile ("com.optimizely.ab:core-api:$java_core_ver") {
66+
exclude(group: 'net.jcip', module: 'jcip-annotations')
67+
exclude(group: 'com.google.code.findbugs', module: 'jsr305')
68+
exclude(group: 'com.google.code.findbugs', module: 'annotations')
69+
}
70+
6671
provided "com.android.support:support-annotations:$support_annotations_ver"
6772

6873
testCompile "junit:junit:$junit_ver"

android-sdk/src/androidTest/java/com/optimizely/ab/android/sdk/OptimizelyClientTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,9 @@ public void onExperimentActivated(Experiment experiment,
868868
Map<String, String> map,
869869
Variation variation) {
870870
}
871+
872+
@Override
873+
public void notify(Object... args) {}
871874
};
872875
optimizelyClient.addNotificationListener(listener);
873876
optimizelyClient.removeNotificationListener(listener);
@@ -884,6 +887,9 @@ public void onExperimentActivated(Experiment experiment,
884887
Map<String, String> map,
885888
Variation variation) {
886889
}
890+
891+
@Override
892+
public void notify(Object... args) {}
887893
};
888894
optimizelyClient.addNotificationListener(listener);
889895
verify(logger).warn("Optimizely is not initialized, could not add notification listener");
@@ -899,6 +905,8 @@ public void onExperimentActivated(Experiment experiment,
899905
Map<String, String> map,
900906
Variation variation) {
901907
}
908+
@Override
909+
public void notify(Object... args) {}
902910
};
903911
optimizelyClient.removeNotificationListener(listener);
904912
verify(logger).warn("Optimizely is not initialized, could not remove notification listener");

android-sdk/src/test/java/com/optimizely/ab/android/sdk/OptimizelyClientTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ public void onExperimentActivated(Experiment experiment,
293293
Map<String, String> map,
294294
Variation variation) {
295295
}
296+
@Override
297+
public void notify(Object... args) {}
296298
};
297299
optimizelyClient.addNotificationListener(listener);
298300
verify(optimizely).addNotificationListener(listener);
@@ -308,6 +310,8 @@ public void onExperimentActivated(Experiment experiment,
308310
Map<String, String> map,
309311
Variation variation) {
310312
}
313+
@Override
314+
public void notify(Object... args) {}
311315
};
312316
optimizelyClient.addNotificationListener(listener);
313317
verify(logger).warn("Optimizely is not initialized, could not add notification listener");
@@ -323,6 +327,8 @@ public void onExperimentActivated(Experiment experiment,
323327
Map<String, String> map,
324328
Variation variation) {
325329
}
330+
@Override
331+
public void notify(Object... args) {}
326332
};
327333
optimizelyClient.removeNotificationListener(listener);
328334
verify(optimizely).removeNotificationListener(listener);
@@ -338,6 +344,8 @@ public void onExperimentActivated(Experiment experiment,
338344
Map<String, String> map,
339345
Variation variation) {
340346
}
347+
@Override
348+
public void notify(Object... args) {}
341349
};
342350
optimizelyClient.removeNotificationListener(listener);
343351
verify(logger).warn("Optimizely is not initialized, could not remove notification listener");

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ext {
5252
min_sdk_version = 10
5353
target_sdk_version = 26
5454

55-
java_core_ver = "1.8.0"
55+
java_core_ver = "1.9.0"
5656
android_logger_ver = "1.3.6"
5757
support_annotations_ver = "24.2.1"
5858
junit_ver = "4.12"

shared/build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ android {
5353

5454
dependencies {
5555
compile "com.noveogroup.android:android-logger:$android_logger_ver"
56-
compile "com.optimizely.ab:core-api:$java_core_ver"
5756
compile "com.google.code.gson:gson:$gson_ver"
58-
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '2.0.1'
57+
compile ("com.optimizely.ab:core-api:$java_core_ver") {
58+
exclude(group: 'net.jcip', module: 'jcip-annotations')
59+
exclude(group: 'com.google.code.findbugs', module: 'jsr305')
60+
exclude(group: 'com.google.code.findbugs', module: 'annotations')
61+
}
62+
5963
provided "com.android.support:support-annotations:$support_annotations_ver"
6064

6165
testCompile "junit:junit:$junit_ver"
@@ -68,7 +72,6 @@ dependencies {
6872
// Set this dependency to build and run Espresso tests
6973
androidTestCompile "com.android.support.test.espresso:espresso-core:$espresso_ver"
7074
androidTestCompile "org.mockito:mockito-core:$mockito_ver"
71-
androidTestCompile 'com.noveogroup.android:android-logger:1.3.1'
7275
androidTestCompile "com.google.dexmaker:dexmaker:$dexmaker_ver"
7376
androidTestCompile "com.google.dexmaker:dexmaker-mockito:$dexmaker_ver"
7477
androidTestCompile "com.noveogroup.android:android-logger:$android_logger_ver"

test-app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies {
4444
compile 'com.android.support:design:24.2.1'
4545
// EXAMPLE REPLACE noveogroup android-looger with slf4j-android logger
4646
// https://mvnrepository.com/artifact/org.slf4j/slf4j-android
47-
compile group: 'org.slf4j', name: 'slf4j-android', version: '1.7.7'
47+
compile group: 'org.slf4j', name: 'slf4j-android', version: '1.7.10'
4848
// EXAMPLE REPLACE gson json parsing with jackson-databind json parsing.
4949
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.7.1'
5050

0 commit comments

Comments
 (0)