-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathbuild.gradle.kts
48 lines (42 loc) · 1.54 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
plugins {
alias(libs.plugins.com.android.application) apply false
alias(libs.plugins.org.jetbrains.kotlin.android) apply false
alias(libs.plugins.com.google.ksp) apply false
alias(libs.plugins.com.google.gms) apply false
alias(libs.plugins.com.google.firebase) apply false
alias(libs.plugins.com.diffplug.spotless)
alias(libs.plugins.com.github.ben.manes.versions)
alias(libs.plugins.nl.littlerobots.version.catalog.update)
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.jetbrains.kotlin.jvm) apply false
}
buildscript {
dependencies {
classpath(libs.hilt.android.gradle.plugin)
}
}
spotless {
// optional: limit format enforcement to just the files changed by this feature branch
//ratchetFrom 'origin/master'
kotlin {
// spotless:off and spotless:on
// toggleOffOn()
target("**/*.kt")
targetExclude("$buildDir/**/*.kt")
targetExclude("bin/**/*.kt")
ktlint("0.48.1")
ktfmt()
}
// Disabling warnings and error messages
// enforceCheck false
}
tasks.withType(com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask::class) {
fun isStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
return stableKeyword || regex.matches(version)
}
gradleReleaseChannel = "current"
revision = "release"
rejectVersionIf { !isStable(candidate.version) }
}