-
-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
72 lines (58 loc) · 1.92 KB
/
Copy pathsettings.gradle.kts
File metadata and controls
72 lines (58 loc) · 1.92 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
import de.fayard.refreshVersions.PrefixRule
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)
disable(GRADLE_UPDATES)
disable(VERSIONS_CATALOG)
}
extraArtifactVersionKeyRules(file("refreshVersions-extra-rules.txt"))
extraVersionRules(
PrefixRule("koin", "io.insert-koin", "koin"),
PrefixRule("ktor", "io.ktor", null),
)
// 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"