You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
38 lines
1.1 KiB
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
// project/build.gradle
|
|
buildscript {
|
|
ext.kotlin_version = '1.8.20' // 使用统一的 Kotlin 版本
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.4.0'
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
|
|
// 强制所有模块使用相同版本的 Kotlin
|
|
configurations.all {
|
|
resolutionStrategy {
|
|
force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
}
|
|
}
|
|
}
|
|
|
|
task clean(type: Delete) {
|
|
delete rootProject.buildDir
|
|
} |