85 lines
2.5 KiB
Groovy
85 lines
2.5 KiB
Groovy
apply plugin: 'com.android.application'
|
|
// apply plugin: 'org.jetbrains.kotlin.android'
|
|
|
|
android {
|
|
compileSdkVersion 34
|
|
|
|
defaultConfig {
|
|
applicationId "com.hjq.language.demo"
|
|
minSdkVersion 16
|
|
targetSdkVersion 34
|
|
versionCode 930
|
|
versionName "9.3"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
// 支持 JDK 1.8
|
|
compileOptions {
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
// Apk 签名的那些事:https://www.jianshu.com/p/a1f8e5896aa2
|
|
signingConfigs {
|
|
config {
|
|
storeFile file(StoreFile)
|
|
storePassword StorePassword
|
|
keyAlias KeyAlias
|
|
keyPassword KeyPassword
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
signingConfig signingConfigs.config
|
|
}
|
|
|
|
release {
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
signingConfig signingConfigs.config
|
|
}
|
|
}
|
|
|
|
applicationVariants.configureEach { variant ->
|
|
// apk 输出文件名配置
|
|
variant.outputs.configureEach { output ->
|
|
outputFileName = rootProject.getName() + '.apk'
|
|
}
|
|
}
|
|
|
|
bundle {
|
|
language {
|
|
enableSplit = false
|
|
}
|
|
}
|
|
|
|
//androidResources {
|
|
// 启用各应用自动设定语言支持:
|
|
// https://developer.android.google.cn/guide/topics/resources/app-languages?hl=zh-cn#auto-localeconfig
|
|
//generateLocaleConfig = true
|
|
//}
|
|
}
|
|
|
|
dependencies {
|
|
// 依赖 libs 目录下所有的 jar 和 aar 包
|
|
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
|
|
|
|
implementation project(':library')
|
|
|
|
// AndroidX 库:https://github.com/androidx/androidx
|
|
implementation 'androidx.appcompat:appcompat:1.4.0'
|
|
// Material 库:https://github.com/material-components/material-components-android
|
|
implementation 'com.google.android.material:material:1.4.0'
|
|
|
|
// 标题栏框架:https://github.com/getActivity/TitleBar
|
|
implementation 'com.github.getActivity:TitleBar:10.5'
|
|
|
|
// 吐司框架:https://github.com/getActivity/Toaster
|
|
implementation 'com.github.getActivity:Toaster:12.6'
|
|
|
|
// 内存泄漏检测:https://github.com/square/leakcanary
|
|
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'
|
|
} |