From dac625d3859f125e94cbef5af76d63f09280a2dc Mon Sep 17 00:00:00 2001 From: Jae Kim Date: Thu, 12 Feb 2026 16:21:23 -0800 Subject: [PATCH] option to run local java-sdk lib --- .gitignore | 2 ++ android-sdk/build.gradle | 11 ++++++++--- shared/build.gradle | 9 +++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9212357f..a3c8f936 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ .DS_Store /build /captures +libs/ values.gradle jacoco.exec +.vscode/ diff --git a/android-sdk/build.gradle b/android-sdk/build.gradle index 1ed3a587..c049276f 100644 --- a/android-sdk/build.gradle +++ b/android-sdk/build.gradle @@ -72,8 +72,13 @@ dependencies { api project(':event-handler') api project(':user-profile') api project(':odp') - api ("com.optimizely.ab:core-api:$java_core_ver") { - exclude group: 'com.google.code.findbugs' + // Enable using a local core-api jar for testing when the 'useLocalJars' property is specified + if (project.hasProperty('useLocalJars') && file('../libs/core-api.jar').exists()) { + api files('../libs/core-api.jar') + } else { + api ("com.optimizely.ab:core-api:$java_core_ver") { + exclude group: 'com.google.code.findbugs' + } } implementation "org.slf4j:slf4j-api:$slf4j_ver" @@ -100,7 +105,7 @@ dependencies { androidTestImplementation "com.noveogroup.android:android-logger:$android_logger_ver" androidTestImplementation "com.google.code.gson:gson:$gson_ver" androidTestImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion" - + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/shared/build.gradle b/shared/build.gradle index 1f47deca..50103bea 100644 --- a/shared/build.gradle +++ b/shared/build.gradle @@ -45,8 +45,13 @@ android { } dependencies { - api ("com.optimizely.ab:core-api:$java_core_ver") { - exclude group: 'com.google.code.findbugs' + // Enable using a local core-api jar for testing when the 'useLocalJars' property is specified + if (project.hasProperty('useLocalJars') && file('../libs/core-api.jar').exists()) { + api files('../libs/core-api.jar') + } else { + api ("com.optimizely.ab:core-api:$java_core_ver") { + exclude group: 'com.google.code.findbugs' + } } implementation "androidx.annotation:annotation:$annotations_ver"