Metro/build.gradle
2022-08-14 13:42:40 +05:30

42 lines
No EOL
1.2 KiB
Groovy

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
lifecycle_version='2.5.1'
navigation_version = '2.5.1'
mdc_version = '1.7.0-beta01'
preference_version = '1.2.0'
appcompat_version = '1.5.0'
core_version='1.8.0'
}
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
}
}
plugins {
id 'com.google.devtools.ksp' version '1.7.10-1.0.6' apply false
id "com.github.ben-manes.versions" version "0.42.0"
}
def isNonStable = { String version ->
def stableKeyword = ['RELEASE', 'FINAL', 'GA'].any { it -> version.toUpperCase().contains(it) }
def regex = /^[0-9,.v-]+(-r)?$/
return !stableKeyword && !(version ==~ regex)
}
tasks.named("dependencyUpdates").configure {
rejectVersionIf {
isNonStable(it.candidate.version)
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}