This repository has been archived by the owner on May 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build-android.gradle
75 lines (65 loc) · 2.49 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
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()
}
allprojects {
group = ProjectValues.groupId
version = "${version}" // from gradle.properties
archivesBaseName = ProjectValues.artifactId
}
android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 16
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_7
targetCompatibility JavaVersion.VERSION_1_7
}
packagingOptions {
exclude 'META-INF/**'
exclude 'META-INF/**'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies { // see Dependencies.kt in buildSrc
// See note in Dependencies.kt in buildSrc on the purpose of "privateImplementation".
// The Android Gradle plugin doesn't seem to have a good way to customize the classpath
// of the compile and test tasks, but since we're not actually publishing any Android
// artifacts from this project (we use this build only for CI testing), we can simply
// copy the dependencies from "privateImplementation" into the standard "implementation"
// for the Android build.
Libs.privateImplementation.each { implementation(it) }
Libs.javaTestImplementation.each { testImplementation(it) }
Libs.androidTestImplementation.each { androidTestImplementation(it) }
}