forked from mapbox/mapbox-navigation-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (101 loc) · 3.55 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
buildscript {
apply from: "${rootDir}/gradle/dependencies.gradle"
repositories {
google()
mavenCentral()
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')
}
}
gradlePluginPortal()
repositories {
maven { url "https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven" }
}
}
dependencies {
classpath pluginDependencies.gradle
classpath pluginDependencies.kotlin
classpath pluginDependencies.dependencyUpdates
classpath pluginDependencies.jacoco
classpath pluginDependencies.googleServices
classpath pluginDependencies.license
// Used by license. Add this dependency explicitly,
// because the version used by license has been removed from the repository.
// This dependency may be removed when we bump license version.
classpath pluginDependencies.kotlinHtmlJvm
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()
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 = project.hasProperty('ALLOW_SNAPSHOT_REPOSITORY') ? project.property('ALLOW_SNAPSHOT_REPOSITORY') : (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')
}
}
}
gradlePluginPortal()
}
}
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"
dokkaHtmlMultiModule {
outputDirectory.set(kdocPath)
}
task clean(type: Delete) {
delete rootProject.buildDir
}