| | |
| | | applicationId "com.application.zhangshi_app_android" |
| | | minSdk 24 |
| | | targetSdk 33 |
| | | versionCode 1 |
| | | versionName "1.0" |
| | | |
| | | versionCode 8 |
| | | versionName "1.0.7" |
| | | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| | | ndk { |
| | | //APP的build.gradle设置支持的SO库架构 |
| | | abiFilters 'armeabi', 'armeabi-v7a', 'x86' , 'arm64-v8a', 'x86_64' |
| | | } |
| | | } |
| | | // signingConfigs { |
| | | // release { |
| | | // storeFile file('xxx.keystore') |
| | | // storePassword '123456' |
| | | // keyAlias 'alias' |
| | | // keyPassword '123456' |
| | | // } |
| | | // } |
| | | 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 |
| | | signingConfig signingConfigs.release |
| | | // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' |
| | | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| | | } |
| | |
| | | minifyEnabled false //不启用Proguard |
| | | shrinkResources false //是否清理无用资源,依赖于minifyEnabled |
| | | zipAlignEnabled false //是否启用zipAlign压缩 |
| | | // signingConfig signingConfigs.release |
| | | signingConfig signingConfigs.release |
| | | } |
| | | } |
| | | |
| | | |
| | | buildFeatures{ |
| | | dataBinding = true |
| | | viewBinding true |
| | | } |
| | | android.applicationVariants.all { variant -> |
| | | variant.outputs.all { |
| | | def createTime = new Date().format("YYYYMMdd", TimeZone.getTimeZone("GMT+08:00")) |
| | | def fileName = "Bendudu${createTime}.apk" |
| | | outputFileName = fileName |
| | | } |
| | | } |
| | | compileOptions { |
| | | sourceCompatibility JavaVersion.VERSION_1_8 |
| | |
| | | |
| | | 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') |
| | | |
| | | } |
| | | } |