apply plugin: 'com.android.application' apply plugin: 'kotlin-android' def appName() { return "KuxinAppStore" } def releaseTime() { return new Date().format("yyyyMMdd_HHmmss", TimeZone.getDefault()) } android { compileSdkVersion 29 buildToolsVersion "29.0.3" defaultConfig { applicationId "com.uiuipad.appstore" minSdkVersion 26 targetSdkVersion 29 versionCode 2 versionName "1.0.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ndk { //选择要添加的对应 cpu 类型的 .so 库。 abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a' // 还可以添加 'x86', 'x86_64', 'mips', 'mips64' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } lintOptions { checkReleaseBuilds false } //签名 signingConfigs { //iPlay50 mini,iPlay50 android13 共用签名 iPlay50mini { storeFile file("keystore/iPlay50Mini.keystore") storePassword "android" keyAlias "platform" keyPassword "android" v2SigningEnabled false } iPlay50SE { storeFile file("keystore/iPlay50SE.keystore") storePassword "123456" keyAlias "iplay50se" keyPassword "123456" v1SigningEnabled true v2SigningEnabled true } U807 { storeFile file("keystore/AllwinnerU807.jks") storePassword "123456" keyAlias "u807" keyPassword "123456" v2SigningEnabled false } U807UserDebug { storeFile file("keystore/U807userdebug.keystore") storePassword "123456" keyAlias "u807userdebug" keyPassword "123456" v2SigningEnabled false } G10P { storeFile file("keystore/G10PMTK11.jks") storePassword "123456" keyAlias "G10PMTK11" keyPassword "123456" v1SigningEnabled true v2SigningEnabled true } teclast8183 { storeFile file("keystore/TeclastMTK12.jks") storePassword "123456" keyAlias "TeclastMTK12" keyPassword "123456" v2SigningEnabled false } UnisocS6688 { storeFile file("keystore/UnisocS6688.jks") storePassword "123456" keyAlias "unisocs6688userdebug" keyPassword "123456" v1SigningEnabled true v2SigningEnabled true } Aigo1071 { storeFile file("keystore/Aigo1071.jks") storePassword "123456" keyAlias "aigo1071" keyPassword "123456" v1SigningEnabled true v2SigningEnabled true } } buildTypes { Aigo1071Debug.initWith(debug) Aigo1071Debug { versionNameSuffix "-debug" debuggable true signingConfig signingConfigs.Aigo1071 buildConfigField "String", "platform", '"W8183"' } Aigo1071Release.initWith(release) Aigo1071Release { signingConfig signingConfigs.Aigo1071 buildConfigField "String", "platform", '"W8183"' } UnisocS6688Debug.initWith(debug) UnisocS6688Debug { versionNameSuffix "-debug" debuggable true signingConfig signingConfigs.UnisocS6688 buildConfigField "String", "platform", '"S6688"' } UnisocS6688Release.initWith(release) UnisocS6688Release { signingConfig signingConfigs.UnisocS6688 buildConfigField "String", "platform", '"S6688"' } teclast8183Debug.initWith(debug) teclast8183Debug { versionNameSuffix "-debug" debuggable true signingConfig signingConfigs.teclast8183 buildConfigField "String", "platform", '"A11MTK8183"' } teclast8183Release.initWith(release) teclast8183Release { signingConfig signingConfigs.teclast8183 buildConfigField "String", "platform", '"A11MTK8183"' } G10PDebug.initWith(debug) G10PDebug { versionNameSuffix "-debug" debuggable true signingConfig signingConfigs.G10P buildConfigField "String", "platform", '"G10P"' } G10PRelease.initWith(release) G10PRelease { signingConfig signingConfigs.G10P buildConfigField "String", "platform", '"G10P"' } U807UserDebug.initWith(release) U807UserDebug { buildConfigField "String", "platform", '"U807"' // versionNameSuffix "-debug" // debuggable true signingConfig signingConfigs.U807UserDebug } U807Debug.initWith(debug) U807Debug { buildConfigField "String", "platform", '"U807"' versionNameSuffix "-debug" debuggable true signingConfig signingConfigs.U807 } U807Release.initWith(release) U807Release { buildConfigField "String", "platform", '"U807"' signingConfig signingConfigs.U807 } iPlay50SEDebug.initWith(debug) iPlay50SEDebug { buildConfigField "String", "platform", '"iPaly50SE"' versionNameSuffix "-debug" debuggable true signingConfig signingConfigs.iPlay50SE } iPlay50SERelease.initWith(release) iPlay50SERelease { buildConfigField "String", "platform", '"iPaly50SE"' signingConfig signingConfigs.iPlay50SE } debug { versionNameSuffix "-debug" minifyEnabled false //Zipalign优化 zipAlignEnabled true signingConfig signingConfigs.iPlay50mini applicationVariants.all { variant -> variant.outputs.each { output -> if (outputFile != null) { def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk" output.outputFileName = fileName } } } } release { //混淆 minifyEnabled false //Zipalign优化 zipAlignEnabled true //前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' //签名 signingConfig signingConfigs.iPlay50mini // 将release版本的包名重命名,加上版本及日期 applicationVariants.all { variant -> variant.outputs.each { output -> def outputFile = "" if (outputFile != null) { def fileName = "${appName()}-${variant.versionCode}-V${variant.versionName}-${releaseTime()}-${buildType.name}.apk" output.outputFileName = new File(outputFile, fileName) } } } } } sourceSets { G10PDebug { manifest.srcFile 'src/debug/AndroidManifest.xml' } U807Debug { manifest.srcFile 'src/debug/AndroidManifest.xml' } U807Debug { manifest.srcFile 'src/debug/AndroidManifest.xml' } U807UserDebug { manifest.srcFile 'src/debug/AndroidManifest.xml' } debug { manifest.srcFile 'src/debug/AndroidManifest.xml' } G10PRelease { manifest.srcFile 'src/main/AndroidManifest.xml' } U807Release { manifest.srcFile 'src/main/AndroidManifest.xml' } iPlay50SERelease { manifest.srcFile 'src/main/AndroidManifest.xml' } release { manifest.srcFile 'src/main/AndroidManifest.xml' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.cardview:cardview:1.0.0' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation "androidx.core:core-ktx:1.6.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" //butterknife implementation 'com.jakewharton:butterknife:10.2.3' // If you are using Kotlin, replace annotationProcessor with kapt. // annotationProcessor rootProject.ext.dependencies["butterknife-compiler"] annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3' //github第三方控件 implementation 'io.github.h07000223:flycoTabLayout:3.0.0' //下拉刷新控件 implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.3' //1.0.5及以前版本的老用户升级需谨慎,API改动过大 implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.1.3' //没有使用特殊Header,可以不加这行 //glide implementation 'com.github.bumptech.glide:glide:4.15.1' annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1' //磁盘缓存 implementation 'com.jakewharton:disklrucache:2.0.2' //aria implementation 'com.arialyy.aria:core:3.8.15' annotationProcessor 'com.arialyy.aria:compiler:3.8.15' //动态权限框架 implementation 'com.hjq:xxpermissions:6.0' //okhttp implementation 'com.squareup.okhttp3:okhttp:4.9.2' //Retrofit implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' // implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0' implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0' //RxJava implementation 'io.reactivex.rxjava3:rxjava:3.0.0' implementation 'io.reactivex.rxjava3:rxandroid:3.0.0' //生命周期管理 implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2' implementation 'com.trello.rxlifecycle4:rxlifecycle-android:4.0.2' implementation 'com.trello.rxlifecycle4:rxlifecycle-components:4.0.2' implementation 'com.trello.rxlifecycle4:rxlifecycle-components-preference:4.0.2' implementation 'com.trello.rxlifecycle4:rxlifecycle-android-lifecycle:4.0.2' //google implementation 'com.google.code.gson:gson:2.9.0' implementation 'com.google.zxing:core:3.5.0' //MMKV implementation 'com.tencent:mmkv-static:1.2.13' //banner图 implementation 'com.zhpan.library:bannerview:2.6.4' //更换字体框架 implementation 'uk.co.chrisjenx:calligraphy:2.3.0' //工具类 implementation 'com.blankj:utilcodex:1.31.1' //沉浸状态栏 implementation 'com.gitee.zackratos:UltimateBarX:0.8.0' }