-
Notifications
You must be signed in to change notification settings - Fork 48
/
build.gradle
75 lines (63 loc) · 1.94 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
buildscript {
apply from: "${rootDir}/gradle/dependencies.gradle"
repositories {
google()
jcenter()
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = project.hasProperty('SDK_REGISTRY_TOKEN') ? project.property('SDK_REGISTRY_TOKEN') : System.getenv('SDK_REGISTRY_TOKEN')
}
}
}
dependencies {
classpath pluginDependencies.gradle
classpath pluginDependencies.mapboxSdkVersions
if (SDK_REGISTRY == 'true') {
println 'SDK_REGISTRY=true'
classpath pluginDependencies.mapboxSdkRegistry
} else {
println 'SDK_REGISTRY=false'
}
}
}
allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
group = GROUP
}
subprojects {
apply plugin: 'idea'
apply from: "${rootDir}/gradle/dependencies.gradle"
afterEvaluate {
tasks.findByName('check').dependsOn('checkstyle')
}
}
def TESTABLE_MODULES = ["libcore", "libtelemetry", "liblocation"]
def RELEASE_MODULES = ["libcore", "libtelemetry"]
subprojects { subproject ->
if (TESTABLE_MODULES.contains(subproject.name)) {
apply from: "${rootDir}/gradle/checkstyle.gradle"
apply from: "${rootDir}/gradle/jacoco.gradle"
}
if (RELEASE_MODULES.contains(subproject.name)) {
subproject.afterEvaluate {
subproject.apply from: "javadoc.gradle"
subproject.apply plugin: 'com.mapbox.android.sdk.versions'
}
subproject.apply from: "${rootDir}/gradle/mvn-push-android.gradle"
}
if (subproject.name == "libtelemetry") {
subproject.apply from: "${rootDir}/gradle/download-schema.gradle"
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}