- MainActivity/TestActivity 改用 DataBinding 和 ViewModel - 移除 ButterKnife 和旧的 MVP Contact 类 - 升级 Gradle、Kotlin 及构建脚本 - 配置 CMake 以支持 16KB 页面大小
64 lines
2.4 KiB
Groovy
64 lines
2.4 KiB
Groovy
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
buildscript {
|
|
ext.kotlin_version = "2.4.0"
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven { url 'https://jitpack.io' }
|
|
maven { url 'https://maven.google.com' }
|
|
maven { url 'https://developer.huawei.com/repo/' }
|
|
maven { url 'https://developer.hihonor.com/repo' }
|
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
|
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.13.2'
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
|
|
classpath "com.tencent.android.tpns:tpnsplugin:1.8.0"
|
|
|
|
// NOTE: Do not place your application dependencies here; they belong
|
|
// in the individual module build.gradle files
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
configurations.all {
|
|
resolutionStrategy {
|
|
force 'androidx.constraintlayout:constraintlayout:2.0.4'
|
|
// 统一 androidx.annotation
|
|
force 'androidx.annotation:annotation:1.3.0'
|
|
// 统一 lifecycle-runtime
|
|
force 'androidx.lifecycle:lifecycle-runtime:2.3.1'
|
|
// 统一 Kotlin 标准库(需与 kotlin_version 保持一致,否则运行时会缺 EnumEntriesKt 等类)
|
|
force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven { url 'https://jitpack.io' }
|
|
maven { url 'https://maven.google.com' }
|
|
maven { url 'https://developer.huawei.com/repo/' }
|
|
maven { url 'https://developer.hihonor.com/repo' }
|
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
|
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
|
}
|
|
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(JavaCompile) {
|
|
//设置jar相对包路径或绝对路径
|
|
options.compilerArgs.add('-Xbootclasspath/p:app/libs/framework.jar')
|
|
}
|
|
}
|
|
}
|
|
|
|
task clean(type: Delete) {
|
|
delete rootProject.buildDir
|
|
} |