Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
145 lines (133 loc) · 4.74 KB
/
Copy pathbuild.gradle
File metadata and controls
145 lines (133 loc) · 4.74 KB
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
import com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorPlugin
import com.vanniktech.dependency.graph.generator.DependencyGraphGeneratorExtension.Generator
buildscript {
apply from: "${rootDir}/gradle/dependencies.gradle"
repositories {
google()
mavenLocal()
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()
}
dependencies {
classpath pluginDependencies.gradle
classpath pluginDependencies.kotlin
classpath pluginDependencies.dependencyUpdates
classpath pluginDependencies.dependencyGraph
classpath pluginDependencies.jacoco
classpath pluginDependencies.kover
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: 'org.jetbrains.dokka'
task testReport(type: TestReport, group: 'Build') {
description = 'Generates an aggregate test report'
destinationDir = file("${buildDir}/reports/allTests")
}
allprojects {
repositories {
google()
mavenLocal()
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() ?: true)
if (addSnapshotsRepo) {
if (!project.hasProperty("hasPrintedSnapshotRepositoryAdded")) {
println("Snapshot repository reference added.")
project.ext.hasPrintedSnapshotRepositoryAdded = true
}
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/detekt.gradle"
// Inlined rather than kept in gradle/dependencies-graph.gradle: that script needed
// `import`s, and a script plugin compiles against its own buildscript classpath only.
// Declaring one there gave it an isolated ScriptHandler that ignored the centrally
// configured repositories and resolved straight from Maven Central.
plugins.apply(DependencyGraphGeneratorPlugin)
dependencyGraphGenerator {
generators {
add(new Generator(
"mapboxLibraries", // Suffix for our Gradle task.
{ dependency -> dependency.getModuleGroup().startsWith("com.mapbox") }, // Only want Mapbox libs.
{ dependency -> true }, // Include transitive dependencies.
))
}
}
plugins.withId('org.jetbrains.kotlin.jvm') {
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
}
apply from: "${rootDir}/gradle/kdoc-settings.gradle"
dokkaHtmlMultiModule {
outputDirectory.set(kdocPath)
}
apply plugin: 'org.jetbrains.kotlinx.kover'
kover {
merge {
allProjects()
}
reports {
filters {
excludes {
annotatedBy("androidx.compose.runtime.Composable")
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}