-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-android.gradle
76 lines (65 loc) · 2.55 KB
/
build-android.gradle
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
apply plugin: 'com.android.library'
//apply plugin: 'com.github.dcendents.android-maven'
buildscript {
repositories {
mavenCentral()
mavenLocal()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
}
}
// This Gradle script is used only when we are running tests in an Android environment to verify
// that the project is Android-compatible. We do not publish an Android build - that is done in
// the android-client-sdk project.
repositories {
mavenLocal()
// Before LaunchDarkly release artifacts get synced to Maven Central they are here along with snapshots:
maven { url "https://oss.sonatype.org/content/groups/public/" }
mavenCentral()
google()
}
apply from: 'build-shared.gradle'
android {
compileSdkVersion 25
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName version
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-proguard-rules.pro'
// The following argument makes the Android Test Orchestrator run its
// "pm clear" command after each test invocation. This command ensures
// that the app's state is completely cleared between tests.
testInstrumentationRunnerArguments clearPackageData: 'true'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/**'
exclude 'META-INF/**'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
// See build-shared-gradle regarding the purpose of "privateImplementation" - in the
// Android build this is not an issue, because we're not building for release, we
// just want to run tests.
configurations.privateImplementation.dependencies.each { implementation(it) }
androidTestImplementation "junit:junit:4.12"
androidTestImplementation "org.hamcrest:hamcrest-library:1.3"
androidTestImplementation "uk.org.lidalia:slf4j-test:1.1.0"
androidTestImplementation "com.android.support.test:runner:1.0.2"
androidTestImplementation("com.launchdarkly:test-helpers:1.1.0") {
exclude group: "org.hamcrest" // avoid duplicate loading of Hamcrest classes
exclude group: "org.eclipse.jetty" // we don't use the HTTP helpers and they don't work in Android
exclude group: "com.squareup.okhttp3" // also unused, causes dex limit to be exceeded
}
}