Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 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,22 +160,25 @@ 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.4.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"
}
}

boolean useOrchestrator() {
return project.hasProperty('orchestrator') ? project.property('orchestrator') : false
return true//return project.hasProperty('orchestrator') ? project.property('orchestrator') : false
}
2 changes: 1 addition & 1 deletion android-core/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<application
android:usesCleartextTraffic="true">

<activity android:exported="true" android:name=".WebViewActivity">
<activity android:exported="true" android:name=".internal.MParticleJSInterfaceITest$WebViewActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
236 changes: 0 additions & 236 deletions android-core/src/androidTest/java/com/mparticle/DataplanTest.java

This file was deleted.

Loading