123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- apply plugin: 'com.android.application'
- def releaseTime() {
- return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
- }
- android {
- compileSdkVersion rootProject.ext.android["compileSdkVersion"]
-
- useLibrary 'org.apache.http.legacy'
- compileOptions {
- targetCompatibility JavaVersion.VERSION_1_8
- sourceCompatibility JavaVersion.VERSION_1_8
- }
- defaultConfig {
- applicationId "com.xwkj.test"
- minSdkVersion rootProject.ext.android["minSdkVersion"]
- targetSdkVersion 29
- versionCode 38
- versionName "3.8"
- testInstrumentationRunner rootProject.ext.dependencies["androidJUnitRunner"]
- flavorDimensions "1"
- ndk {
- abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86"
- }
- }
- sourceSets {
- main {
- jniLibs.srcDirs = ['libs']
- }
- }
- signingConfigs {
- debug {
- keyAlias 'zkjc_police'
- keyPassword 'jlszkjc777888'
- storeFile file("../sign/keystore.jks")
- storePassword 'jlszkjc777888'
- // v2SigningEnabled false
- }
- release {
- keyAlias 'zkjc_police'
- keyPassword 'jlszkjc777888'
- storeFile file("../sign/keystore.jks")
- storePassword 'jlszkjc777888'
- // v2SigningEnabled false
- }
- }
- buildTypes {
- debug {
- buildConfigField "boolean", "LOG_DEBUG", "true"
- buildConfigField "boolean", "USE_CANARY", "true"
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- release {
- buildConfigField "boolean", "LOG_DEBUG", "false"
- buildConfigField "boolean", "USE_CANARY", "false"
- /*minifyEnabled false
- shrinkResources true
- zipAlignEnabled true*/
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- productFlavors {
- //应用商店版本
- appstore {
- resValue "string", "app_name", "照片合成"
- signingConfig signingConfigs.release
- manifestPlaceholders = [UMENG_CHANNEL: "appstore", CATEGORY: "android.intent.category.DEFAULT", APP_ICON: "@mipmap/ic_launcher"]
- }
- //非应用商店版本
- unappstore {
- resValue "string", "app_name", "照片合成"
- signingConfig signingConfigs.release
- manifestPlaceholders = [UMENG_CHANNEL: "unappstore", CATEGORY: "android.intent.category.LAUNCHER", APP_ICON: "@mipmap/ic_launcher"]
- }
- }
- productFlavors.all { flavor ->
- flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name, CATEGORY_VALUE: flavor.manifestPlaceholders.CATEGORY, APP_ICON: flavor.manifestPlaceholders.APP_ICON]
- // flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
- }
- applicationVariants.all { variant ->
- variant.outputs.all {
- if (variant.buildType.name == 'release') {
- // release:输出文件名必须命名为 outputFileName
- outputFileName = "${variant.productFlavors[0].name}_${variant.productFlavors[0].applicationId}_${buildType.name}_v${variant.versionName}_${releaseTime()}.apk"
- // output.outputFile = new File(output.outputFile.parent, apkName)
- } else {
- // debug 输出文件名必须命名为 outputFileName
- outputFileName = "${variant.productFlavors[0].name}_${project.getName()}_${buildType.name}.apk"
- // output.outputFile = new File(output.outputFile.parent, apkName)
- }
- }
- }
- configurations.all {
- resolutionStrategy {
- force 'androidx.core:core-ktx:1.6.0'
- }
- }
- lintOptions {
- disable 'InvalidPackage'
- disable "ResourceType"
- abortOnError false
- }
- }
- repositories {
- flatDir {
- dirs 'libs', '../common/libs'
- }
- }
- dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- /* implementation 'me.jessyan:arms:2.5.2'
- implementation 'me.jessyan:arms-imageloader-glide:2.5.2'*/
- //view
- implementation rootProject.ext.dependencies["autosize"]
- implementation 'androidx.appcompat:appcompat:1.0.2'
- implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
- annotationProcessor(rootProject.ext.dependencies["butterknife-compiler"]) {
- exclude module: 'support-annotations'
- }
- //tools
- annotationProcessor rootProject.ext.dependencies["dagger2-compiler"]
- implementation rootProject.ext.dependencies["picasso"]
- //注意 Arms 核心库现在并不会依赖某个 EventBus, 要想使用 EventBus, 还请在项目中自行依赖对应的 EventBus
- //现在支持两种 EventBus, greenrobot 的 EventBus 和畅销书 《Android源码设计模式解析与实战》的作者 何红辉 所作的 AndroidEventBus
- //依赖后 Arms 会自动检测您依赖的 EventBus 并自动注册
- //建议使用 AndroidEventBus, 特别是组件化项目, 原因请看 https://github.com/hehonghui/AndroidEventBus/issues/49
- //这种做法可以让使用者有自行选择三方库的权利, 并且还可以减轻 Arms 的体积
- // implementation rootProject.ext.dependencies["androideventbus"]
- // implementation rootProject.ext.dependencies["eventbus"]
- //test
- debugImplementation rootProject.ext.dependencies["canary-debug"]
- releaseImplementation rootProject.ext.dependencies["canary-release"]
- testImplementation rootProject.ext.dependencies["canary-release"]
- testImplementation rootProject.ext.dependencies["junit"]
- implementation rootProject.ext.dependencies["eventbus"]
- // implementation rootProject.ext.dependencies["design"]
- implementation project(':thirdparty')
- implementation project(':common')
- implementation 'com.github.chrisbanes.photoview:library:1.2.4'
- // implementation 'me.jessyan:progressmanager:1.5.0'
- //页面引导
- // implementation 'com.binioter:guideview:1.0.0'
- implementation 'com.google.android.material:material:1.1.0'
- implementation 'com.xm.permissions:XmPermissions:1.0.1'
- implementation 'com.github.chrisbanes.photoview:library:1.2.4'
- implementation(name: 'imagepicker-release', ext: 'aar')
- //implementation 'com.contrarywind:Android-PickerView:4.1.8'
- implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
- implementation 'org.apache.poi:poi:4.1.2'
- implementation 'org.osmdroid:osmdroid-android:6.0.1'
- //implementation 'com.github.zzy0516alex:FileSelectorRelease:v6.1'
- }
|