forked from SagerNet/SagerNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
65 lines (56 loc) · 2.17 KB
/
build.gradle.kts
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
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.github.ben-manes.versions") version "0.39.0" apply false
id("com.google.protobuf") version "0.8.16" apply false
}
buildscript {
apply(from = "repositories.gradle.kts")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
val androidPluginVersion = rootProject.extra["androidPluginVersion"].toString()
val kotlinVersion = rootProject.extra["kotlinVersion"].toString()
val playPublisherVersion = rootProject.extra["playPublisherVersion"].toString()
classpath("com.android.tools.build:gradle:$androidPluginVersion")
classpath(kotlin("gradle-plugin", kotlinVersion))
classpath("org.mozilla.rust-android-gradle:plugin:0.8.6")
classpath("com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:8.9.0")
classpath("com.github.triplet.gradle:play-publisher:$playPublisherVersion")
}
}
allprojects {
apply(from = "${rootProject.projectDir}/repositories.gradle.kts")
apply(plugin = "com.github.ben-manes.versions")
tasks.named<DependencyUpdatesTask>("dependencyUpdates") {
resolutionStrategy {
componentSelection {
all {
val rejected = listOf("alpha", "beta", "rc", "cr", "m", "preview", "b", "ea")
.map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-+]*") }
.any { it.matches(candidate.version) }
if (rejected) {
reject("Release candidate")
}
}
}
}
// optional parameters
checkForGradleUpdate = true
outputFormatter = "json"
outputDir = "build/dependencyUpdates"
reportfileName = "report"
}
}
tasks.register<Delete>("clean") {
delete(rootProject.buildDir)
}
// skip uploading the mapping to Crashlytics
subprojects {
tasks.whenTaskAdded {
if (name.contains("uploadCrashlyticsMappingFile")) enabled = false
}
}