Metro/build.gradle
2022-07-22 14:53:49 +08:00

41 lines
No EOL
1.1 KiB
Groovy

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
lifecycle_version='2.5.0'
navigation_version = '2.5.0'
mdc_version = '1.7.0-alpha02'
preference_version = '1.2.0'
appcompat_version = '1.4.2'
core_version='1.8.0'
}
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
}
}
plugins {
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
}