Skip to content

Commit dac625d

Browse files
committed
option to run local java-sdk lib
1 parent f751e0c commit dac625d

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
.DS_Store
1010
/build
1111
/captures
12+
libs/
1213
values.gradle
1314
jacoco.exec
15+
.vscode/
1416

android-sdk/build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,13 @@ dependencies {
7272
api project(':event-handler')
7373
api project(':user-profile')
7474
api project(':odp')
75-
api ("com.optimizely.ab:core-api:$java_core_ver") {
76-
exclude group: 'com.google.code.findbugs'
75+
// Enable using a local core-api jar for testing when the 'useLocalJars' property is specified
76+
if (project.hasProperty('useLocalJars') && file('../libs/core-api.jar').exists()) {
77+
api files('../libs/core-api.jar')
78+
} else {
79+
api ("com.optimizely.ab:core-api:$java_core_ver") {
80+
exclude group: 'com.google.code.findbugs'
81+
}
7782
}
7883
implementation "org.slf4j:slf4j-api:$slf4j_ver"
7984

@@ -100,7 +105,7 @@ dependencies {
100105
androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver"
101106
androidTestImplementation "com.google.code.gson:gson:$gson_ver"
102107
androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion"
103-
108+
104109
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
105110
}
106111

shared/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ android {
4545
}
4646

4747
dependencies {
48-
api ("com.optimizely.ab:core-api:$java_core_ver") {
49-
exclude group: 'com.google.code.findbugs'
48+
// Enable using a local core-api jar for testing when the 'useLocalJars' property is specified
49+
if (project.hasProperty('useLocalJars') && file('../libs/core-api.jar').exists()) {
50+
api files('../libs/core-api.jar')
51+
} else {
52+
api ("com.optimizely.ab:core-api:$java_core_ver") {
53+
exclude group: 'com.google.code.findbugs'
54+
}
5055
}
5156

5257
implementation "androidx.annotation:annotation:$annotations_ver"

0 commit comments

Comments
 (0)