-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
executable file
·60 lines (53 loc) · 1.65 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
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
plugins {
id(Plugins.versions) version Versions.versionsPlugin
}
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(Plugins.androidTools)
classpath(kotlin(Plugins.kotlin, Versions.kotlin))
}
}
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
}
allprojects {
repositories {
google()
mavenCentral()
maven("https://jitpack.io")
}
}
tasks {
register("clean", Delete::class) {
delete(buildDir)
}
named<DependencyUpdatesTask>("dependencyUpdates") {
resolutionStrategy {
componentSelection {
all {
val rejected = listOf("alpha", "beta", "rc", "cr", "m", "preview")
.map { qualifier -> Regex("(?i).*[.-]$qualifier[.\\d-]*") }
.any { it.matches(candidate.version) }
if (rejected) {
reject("Release candidate")
}
if (candidate.group == "com.squareup.okhttp3") {
val version = candidate.version.split(".")
if (version.component1().toInt() > 3 || version.component2().toInt() > 12)
reject("We use okhttp 3.12.*, because okhttp 3.13+ requires API 21")
}
}
}
}
checkForGradleUpdate = true
outputFormatter = "json"
outputDir = "build/dependencyUpdates"
reportfileName = "report"
}
}