-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
56 lines (46 loc) · 1.35 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
import com.github.benmanes.gradle.versions.reporter.PlainTextReporter
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.dokka)
alias(libs.plugins.ben.manes.versions)
alias(libs.plugins.ksp)
}
allprojects {
repositories {
mavenLocal()
mavenCentral()
google()
}
}
tasks.withType<DependencyUpdatesTask> {
gradleReleaseChannel = "current"
val showUnresolved: Boolean = project.hasProperty("showUnresolved")
fun isNonStable(version: String): Boolean {
return listOf(
"-alpha",
"-beta",
"-dev",
"-rc",
).any {
version.lowercase().contains(it)
}
}
outputFormatter {
if (!showUnresolved) {
unresolved.dependencies.clear()
}
// temporary fix for: https://github.com/ben-manes/gradle-versions-plugin/issues/733
outdated.dependencies.removeAll { isNonStable(it.available.milestone.orEmpty()) }
val plainTextReporter = PlainTextReporter(
project,
revision,
gradleReleaseChannel
)
plainTextReporter.write(System.out, this)
}
rejectVersionIf {
isNonStable(candidate.version)
}
}