apply plugin: 'com.android.application'
|
|
android {
|
namespace 'com.application.zhangshi_app_android'
|
compileSdk 33
|
|
defaultConfig {
|
applicationId "com.application.zhangshi_app_android"
|
minSdk 24
|
targetSdk 33
|
versionCode 5
|
versionName "1.0.31"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
ndk {
|
//APP的build.gradle设置支持的SO库架构
|
abiFilters 'armeabi', 'armeabi-v7a', 'x86'
|
}
|
}
|
signingConfigs {
|
release {
|
storeFile file(KEY_PATH)
|
storePassword KEY_PASS
|
keyAlias ALIAS_NAME
|
keyPassword ALIAS_PASS
|
}
|
}
|
buildTypes {
|
release {
|
debuggable true
|
minifyEnabled true //启用Proguard
|
shrinkResources true //是否清理无用资源,依赖于minifyEnabled
|
zipAlignEnabled true //是否启用zipAlign压缩
|
signingConfig signingConfigs.release
|
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
}
|
debug {
|
debuggable true
|
minifyEnabled false //不启用Proguard
|
shrinkResources false //是否清理无用资源,依赖于minifyEnabled
|
zipAlignEnabled false //是否启用zipAlign压缩
|
signingConfig signingConfigs.release
|
}
|
}
|
|
|
buildFeatures{
|
dataBinding = true
|
viewBinding true
|
}
|
compileOptions {
|
sourceCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility JavaVersion.VERSION_1_8
|
}
|
}
|
|
dependencies {
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
implementation 'com.google.android.material:material:1.8.0'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
implementation 'androidx.annotation:annotation:1.3.0'
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
|
implementation 'com.google.android.material:material:1.8.0'
|
testImplementation 'junit:junit:4.13.2'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
implementation project(path: ':app_base')
|
|
}
|