Skip to content

Commit bdf1993

Browse files
committed
add test dependency
1 parent 28a1f00 commit bdf1993

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

android-core/build.gradle

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ android {
6262
} else {
6363
testInstrumentationRunnerArgument 'notAnnotation', 'com.mparticle.OrchestratorOnly'
6464
}
65+
66+
if (project.hasProperty('js-sdk-file')) {
67+
def file = file("../android-core/src/androidTest/res/raw")
68+
file.mkdir()
69+
file.createNewFile()
70+
file.text = new File(project.property('js-sdk-file')).text
71+
buildConfigField 'boolean', 'JS_TEST_SDK', 'true'
72+
} else {
73+
buildConfigField 'boolean', 'JS_TEST_SDK', 'false'
74+
}
6575
}
6676

6777
buildTypes {
@@ -134,7 +144,7 @@ dependencies {
134144
api 'androidx.annotation:annotation:[1.0.0,)'
135145
compileOnly 'androidx.core:core:[1.3.2, )'
136146

137-
api 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
147+
api 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'
138148

139149
lintPublish project( path: ':tooling:custom-lint-rules', configuration: 'lintBuild')
140150

@@ -150,19 +160,22 @@ dependencies {
150160
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
151161
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
152162

153-
androidTestImplementation project(':testutils')
154163
if (useOrchestrator()) {
155164
androidTestUtil 'androidx.test:orchestrator:1.3.0'
156165
}
157-
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
166+
androidTestImplementation "org.jetbrains:annotations:+"
167+
androidTestImplementation "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0"
168+
169+
androidTestImplementation "androidx.lifecycle:lifecycle-common:2.5.0"
158170
androidTestImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
171+
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2-native-mt"
172+
androidTestImplementation("com.mparticle.internal:mocking:1.3.0")
173+
androidTestImplementation 'androidx.test:rules:1.4.0'
159174
}
160175

161-
162-
configurations {
163-
all {
164-
exclude module: "httpclient"
165-
exclude module: "commons-logging"
176+
configurations.all {
177+
resolutionStrategy.dependencySubstitution {
178+
substitute module("com.mparticle:android-core") using project(":android-core") because "we need access to internal classes"
166179
}
167180
}
168181

android-kit-base/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ dependencies {
7575
testImplementation 'androidx.legacy:legacy-support-v4:1.0.0'
7676
testImplementation project(':testutils')
7777

78-
androidTestImplementation project(':testutils')
78+
androidTestImplementation "com.mparticle.internal:mocking:1.3.0"
7979
}

0 commit comments

Comments
 (0)