-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathbuild.gradle
More file actions
77 lines (64 loc) · 2.36 KB
/
build.gradle
File metadata and controls
77 lines (64 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
namespace 'com.mparticle.testutils'
testNamespace 'com.mparticle.legacyTest'
compileSdk 33
defaultConfig {
//This is set to 21 to avoid slow multidex.
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
if (legacyTest()) {
testInstrumentationRunnerArgument 'annotation', 'com.mparticle.LegacyOnly'
} else {
testInstrumentationRunnerArgument 'notAnnotation', 'com.mparticle.LegacyOnly'
}
file("../android-core/src/androidTest/res/raw").mkdir()
def file = file("../android-core/src/androidTest/res/raw/mparticle_js_sdk")
file.createNewFile()
if (project.hasProperty('js-sdk-file')) {
file.text = new File(project.property('js-sdk-file')).text
buildConfigField 'boolean', 'JS_TEST_SDK', 'true'
} else {
buildConfigField 'boolean', 'JS_TEST_SDK', 'false'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compileOnly project(':android-core')
compileOnly project(':android-kit-base')
compileOnly 'org.mockito:mockito-android:5.4.0'
api 'androidx.annotation:annotation:1.5.0'
api 'androidx.test.ext:junit:1.1.4'
api 'androidx.test:rules:1.5.0'
androidTestCompileOnly project(':android-core')
if (legacyTest()) {
androidTestImplementation 'com.mparticle:android-core:4.17.1'
} else {
androidTestImplementation project(':android-core')
}
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation 'com.google.firebase:firebase-messaging:20.0.0'
androidTestUtil 'androidx.test:orchestrator:1.4.2'
}
boolean legacyTest() {
return project.hasProperty('legacy') ? project.property('legacy') : false
}