forked from Splitties/refreshVersions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle.kts
65 lines (53 loc) · 1.74 KB
/
settings.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 de.fayard.refreshVersions.core.FeatureFlag.*
import de.fayard.refreshVersions.core.StabilityLevel
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
}
val versionFile = rootDir.parentFile.resolve("plugins/version.txt")
val pluginsVersion = versionFile.readLines().first()
@Suppress("UnstableApiUsage")
plugins {
id("de.fayard.refreshVersions").version(pluginsVersion)
}
}
plugins {
id("com.gradle.enterprise").version("3.8.1")
id("de.fayard.refreshVersions")
}
refreshVersions {
featureFlags {
enable(LIBS)
enable(OLD_TASKS)
disable(GRADLE_UPDATES)
}
extraArtifactVersionKeyRules(file("refreshVersions-extra-rules.txt"))
// ignore dependencies among a blacklist of version keys
rejectVersionIf {
val blacklist = listOf("version.retrofit", "version.okhttp3")
versionKey in blacklist
}
// ignore dependencies among a blacklist of maven groups
rejectVersionIf {
val blacklist = listOf("com.squareup.retrofit", "com.squareup.okhttp3")
moduleId.group in blacklist
}
// ignore all non-stable releases
rejectVersionIf {
candidate.stabilityLevel != StabilityLevel.Stable
}
// Or maybe you want to see alpha versions if you are already using an alpha version, otherwise you want to see only stable versions
rejectVersionIf {
candidate.stabilityLevel.isLessStableThan(current.stabilityLevel)
}
}
gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishOnFailure()
}
}
rootProject.name = "sample-kotlin"
rootProject.buildFileName = "${rootProject.name}.gradle.kts"