forked from mapbox/mapbox-navigation-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
130 lines (121 loc) · 4.46 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
buildscript {
apply from: "${rootDir}/gradle/dependencies.gradle"
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://plugins.gradle.org/m2' }
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.kotlin
classpath pluginDependencies.dependencyUpdates
classpath pluginDependencies.jacoco
classpath pluginDependencies.googleServices
classpath pluginDependencies.license
classpath pluginDependencies.mapboxSdkVersions
classpath pluginDependencies.mapboxSdkRegistry
classpath pluginDependencies.mapboxAccessToken
classpath pluginDependencies.mapboxNativeDownload
classpath pluginDependencies.dokka
classpath pluginDependencies.firebaseCrashlytics
classpath pluginDependencies.googleServices
}
}
apply plugin: 'jacoco'
apply plugin: 'org.jetbrains.dokka'
task testReport(type: TestReport, group: 'Build') {
description = 'Generates an aggregate test report'
destinationDir = file("${buildDir}/reports/allTests")
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://plugins.gradle.org/m2' }
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')
}
}
// we allow access to snapshots repo if ALLOW_SNAPSHOT_REPOSITORY is set, what means we are running on CI
// with Navigation Native forced to be some snapshot version
// if you need to use snapshots while development, just set `addSnapshotsRepo` to true manually
def addSnapshotsRepo = System.getenv("ALLOW_SNAPSHOT_REPOSITORY")?.toBoolean() ?: false
if (addSnapshotsRepo) {
println("Snapshot repository reference added.")
maven {
url 'https://api.mapbox.com/downloads/v2/snapshots/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = project.hasProperty('SDK_REGISTRY_TOKEN') ? project.property('SDK_REGISTRY_TOKEN') : System.getenv('SDK_REGISTRY_TOKEN')
}
}
}
/*maven {
url 'https://mapbox.bintray.com/mapbox_internal'
credentials {
username = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
password = project.hasProperty('BINTRAY_API_KEY') ? project.property('BINTRAY_API_KEY') : System.getenv('BINTRAY_API_KEY')
}
}*/
/*maven {
url 'https://mapbox.bintray.com/mapbox_collab'
credentials {
username = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
password = project.hasProperty('BINTRAY_API_KEY') ? project.property('BINTRAY_API_KEY') : System.getenv('BINTRAY_API_KEY')
}
}*/
/*maven {
url 'https://mapbox.bintray.com/mapbox_private'
credentials {
username = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
password = project.hasProperty('BINTRAY_API_KEY') ? project.property('BINTRAY_API_KEY') : System.getenv('BINTRAY_API_KEY')
}
}*/
maven { url 'https://mapbox.bintray.com/mapbox' }
// uncomment if snapshots access is needed
// maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local/' }
}
}
subprojects {
apply plugin: 'idea'
apply from: "${rootDir}/gradle/dependencies.gradle"
apply from: "${rootDir}/gradle/dependency-updates.gradle"
apply from: "${rootDir}/gradle/checkstyle.gradle"
apply from: "${rootDir}/gradle/dependencies-graph.gradle"
plugins.withId('org.jetbrains.kotlin.jvm') {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
}
apply from: "${rootDir}/gradle/kdoc-settings.gradle"
apply from: "${rootDir}/gradle/verify-common-sdk-version.gradle"
dokkaHtmlMultiModule {
outputDirectory.set(kdocPath)
}
task clean(type: Delete) {
delete rootProject.buildDir
}