-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
56 lines (50 loc) · 1.91 KB
/
build.gradle.kts
File metadata and controls
56 lines (50 loc) · 1.91 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
plugins {
kotlin("multiplatform") version "2.3.0" apply false
kotlin("jvm") version "2.3.0" apply false
kotlin("plugin.serialization") version "2.3.0" apply false
id("com.github.ben-manes.versions") version "0.53.0" apply false
id("com.ncorti.ktfmt.gradle") version "0.25.0" apply false
id("org.jetbrains.kotlinx.kover") version "0.9.4" apply false
}
allprojects {
repositories {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-wrappers/maven")
}
}
subprojects {
apply(plugin = "com.github.ben-manes.versions")
apply(plugin = "com.ncorti.ktfmt.gradle")
extensions.configure<com.ncorti.ktfmt.gradle.KtfmtExtension> {
kotlinLangStyle()
// Enable automatic removal of unused imports during formatting
removeUnusedImports.set(true)
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask<*>> {
compilerOptions {
allWarningsAsErrors.set(true)
progressiveMode.set(true)
freeCompilerArgs.addAll(
"-Xreturn-value-checker=full",
"-Xcontext-parameters",
)
}
}
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
fun isNonStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
return isStable.not()
}
rejectVersionIf {
isNonStable(candidate.version) && !isNonStable(currentVersion)
}
checkForGradleUpdate = true
outputFormatter = "html"
outputDir = "build/dependencyUpdates"
reportfileName = "report"
}
}