diff --git a/android-core/build.gradle b/android-core/build.gradle index 134dec61b..5d0317568 100644 --- a/android-core/build.gradle +++ b/android-core/build.gradle @@ -62,6 +62,16 @@ android { } else { testInstrumentationRunnerArgument 'notAnnotation', 'com.mparticle.OrchestratorOnly' } + + if (project.hasProperty('js-sdk-file')) { + def file = file("../android-core/src/androidTest/res/raw") + file.mkdir() + file.createNewFile() + file.text = new File(project.property('js-sdk-file')).text + buildConfigField 'boolean', 'JS_TEST_SDK', 'true' + } else { + buildConfigField 'boolean', 'JS_TEST_SDK', 'false' + } } buildTypes { @@ -134,7 +144,7 @@ dependencies { api 'androidx.annotation:annotation:[1.0.0,)' compileOnly 'androidx.core:core:[1.3.2, )' - api 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0' + api 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0' lintPublish project( path: ':tooling:custom-lint-rules', configuration: 'lintBuild') @@ -150,19 +160,22 @@ dependencies { testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" - androidTestImplementation project(':testutils') if (useOrchestrator()) { androidTestUtil 'androidx.test:orchestrator:1.3.0' } - androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + androidTestImplementation "org.jetbrains:annotations:+" + androidTestImplementation "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0" + + androidTestImplementation "androidx.lifecycle:lifecycle-common:2.5.0" androidTestImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version" + androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2-native-mt" + androidTestImplementation("com.mparticle.internal:mocking:1.3.0") + androidTestImplementation 'androidx.test:rules:1.4.0' } - -configurations { - all { - exclude module: "httpclient" - exclude module: "commons-logging" +configurations.all { + resolutionStrategy.dependencySubstitution { + substitute module("com.mparticle:android-core") using project(":android-core") because "we need access to internal classes" } } diff --git a/android-kit-base/build.gradle b/android-kit-base/build.gradle index 16366639b..038a89e62 100644 --- a/android-kit-base/build.gradle +++ b/android-kit-base/build.gradle @@ -75,5 +75,5 @@ dependencies { testImplementation 'androidx.legacy:legacy-support-v4:1.0.0' testImplementation project(':testutils') - androidTestImplementation project(':testutils') + androidTestImplementation "com.mparticle.internal:mocking:1.3.0" }