-
Notifications
You must be signed in to change notification settings - Fork 32
/
build.gradle.kts
49 lines (44 loc) · 1.81 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
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
plugins {
alias(libs.plugins.com.android.application) apply false
alias(libs.plugins.com.android.library) apply false
alias(libs.plugins.org.jetbrains.kotlin.android) apply false
alias(libs.plugins.mapsplatform.secrets.gradle.plugin) apply false
alias(libs.plugins.dagger.hilt.android) apply false
alias(libs.plugins.org.jetbrains.kotlin.plugin.serialization) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
alias(libs.plugins.about.lib.plugin) apply false
alias(libs.plugins.firebase.perf.plugin) apply false
alias(libs.plugins.compose.compiler) apply false
// TODO Move some of these to toml file
id("com.github.ben-manes.versions") version "0.41.0"
id("nl.littlerobots.version-catalog-update") version "0.8.4"
id("io.gitlab.arturbosch.detekt") version "1.23.3"
id("org.jlleitschuh.gradle.ktlint") version "12.1.0"
}
buildscript {
dependencies {
classpath(libs.com.google.services)
classpath(libs.com.firebase.crashlytics.plugin)
classpath("com.github.ben-manes:gradle-versions-plugin:0.51.0")
classpath("nl.littlerobots.vcu:plugin:0.8.4")
classpath("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.3")
classpath("com.android.tools.build:gradle:8.3.0")
}
}
versionCatalogUpdate {
pin {
versions.addAll("kotlin-android")
}
}
fun isNonStable(version: String): Boolean {
val nonStableKeyword = listOf("BETA", "ALPHA", "DEV").any { version.uppercase().contains(it) }
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
val isStable = nonStableKeyword.not() || regex.matches(version)
return isStable.not()
}
tasks.withType<DependencyUpdatesTask> {
rejectVersionIf {
isNonStable(candidate.version)
}
}