-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.gradle
210 lines (178 loc) · 6.32 KB
/
build.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'signing'
apply plugin: 'org.ajoberstar.github-pages'
apply plugin: 'com.getkeepsafe.dexcount'
apply plugin: 'io.codearte.nexus-staging'
allprojects {
group = 'com.launchdarkly'
version = '2.7.0'
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xbootclasspath/a:" + System.properties.get("java.home") + "/lib/rt.jar"
}
}
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
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'
}
testOptions {
execution 'ANDROID_TEST_ORCHESTRATOR'
}
lintOptions {
// TODO: fix things and set this to true
abortOnError false
}
configurations {
javadocDeps
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
packagingOptions {
exclude 'META-INF/**'
exclude 'META-INF/**'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
ext {
supportVersion = "26.0.1"
okhttpVersion = "3.9.1"
eventsourceVersion = "1.8.0"
gsonVersion = "2.8.2"
testRunnerVersion = "1.0.2"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleDependency
implementation 'com.google.guava:guava:22.0-android'
implementation "com.google.code.gson:gson:$gsonVersion"
implementation "com.launchdarkly:okhttp-eventsource:$eventsourceVersion"
implementation "com.squareup.okhttp3:okhttp:$okhttpVersion"
implementation 'com.jakewharton.timber:timber:4.7.0'
// Explicitly old version of Google Play Services to allow compatibility without update for
// older phones
implementation 'com.google.android.gms:play-services-base:6.5.87'
androidTestImplementation "com.android.support:appcompat-v7:$supportVersion"
androidTestImplementation "com.android.support:support-annotations:$supportVersion"
implementation "com.android.support:support-annotations:$supportVersion"
androidTestImplementation "com.android.support.test:runner:$testRunnerVersion"
androidTestImplementation "com.android.support.test:rules:$testRunnerVersion"
androidTestUtil "com.android.support.test:orchestrator:$testRunnerVersion"
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
androidTestImplementation 'org.easymock:easymock:3.4'
androidTestImplementation 'junit:junit:4.12'
javadocDeps "com.google.code.gson:gson:$gsonVersion"
javadocDeps "com.squareup.okhttp3:okhttp:$okhttpVersion"
javadocDeps "com.launchdarkly:okhttp-eventsource:$eventsourceVersion"
}
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()
}
buildscript {
repositories {
mavenCentral()
mavenLocal()
google()
jcenter()
}
dependencies {
classpath 'org.ajoberstar:gradle-git:1.5.0-rc.1'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.8.0"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.javadocDeps
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
githubPages {
repoUri = 'https://github.com/launchdarkly/android-client.git'
pages {
from javadoc
}
credentials {
username = githubUser
password = githubPassword
}
}
signing {
sign configurations.archives
}
nexusStaging {
packageGroup = "com.launchdarkly"
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'LaunchDarkly SDK for Android'
packaging 'jar'
description 'Official LaunchDarkly SDK for Android'
url 'https://github.com/launchdarkly/android-client'
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'drichelson'
name 'Dan Richelson'
email 'dan@launchdarkly.com'
}
}
scm {
connection 'scm:git:git://github.com/launchdarkly/android-client.git'
developerConnection 'scm:git:ssh:git@github.com:launchdarkly/android-client.git'
url 'https://github.com/launchdarkly/android-client'
}
}
}
}
}