Skip to content

Commit

Permalink
add test dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
willpassidomo committed Jul 29, 2022
1 parent 8ef5def commit 5971c5e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
29 changes: 21 additions & 8 deletions android-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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')

Expand All @@ -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"
}
}

Expand Down
2 changes: 1 addition & 1 deletion android-kit-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 5971c5e

Please sign in to comment.