mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 14:07:05 +05:30
51 lines
1.3 KiB
Kotlin
51 lines
1.3 KiB
Kotlin
@file:Suppress("DSL_SCOPE_VIOLATION", "UnstableApiUsage")
|
|
|
|
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
|
|
|
buildscript {
|
|
repositories {
|
|
maven {
|
|
url = uri("https://storage.googleapis.com/r8-releases/raw")
|
|
content { includeModule("com.android.tools", "r8") }
|
|
}
|
|
}
|
|
dependencies { classpath(libs.r8) }
|
|
}
|
|
|
|
plugins {
|
|
alias(libs.plugins.spotless)
|
|
alias(libs.plugins.versions)
|
|
alias(libs.plugins.vcu)
|
|
}
|
|
|
|
fun isNonStable(version: String): Boolean {
|
|
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
|
|
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
|
|
val isStable = stableKeyword || regex.matches(version)
|
|
return isStable.not()
|
|
}
|
|
|
|
tasks.withType<DependencyUpdatesTask>().configureEach {
|
|
rejectVersionIf { isNonStable(candidate.version) && !isNonStable(currentVersion) }
|
|
checkForGradleUpdate = false
|
|
checkBuildEnvironmentConstraints = true
|
|
outputFormatter = "json"
|
|
outputDir = "build/dependencyUpdates"
|
|
reportfileName = "report"
|
|
}
|
|
|
|
group = "dev.msfjarvis.claw"
|
|
|
|
version = "1.0"
|
|
|
|
spotless {
|
|
kotlin {
|
|
target("**/*.kt")
|
|
targetExclude("**/build/**")
|
|
ktfmt("0.35").googleStyle()
|
|
}
|
|
kotlinGradle {
|
|
target("**/*.gradle.kts")
|
|
ktfmt("0.35").googleStyle()
|
|
}
|
|
}
|