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.jcjcgz" minSdkVersion rootProject.ext.android["minSdkVersion"] targetSdkVersion 29 versionCode 100 versionName "1.0.0" 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(dir: 'libs', include: ['*.jar']) /* 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 project(':downloaderHelper') // 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 'androidx.appcompat:appcompat:1.0.0' //必须 1.0.0 以上 implementation 'io.github.scwang90:refresh-layout-kernel:2.1.0' //核心必须依赖 implementation 'io.github.scwang90:refresh-header-classics:2.1.0' //经典刷新头 implementation 'io.github.scwang90:refresh-header-radar:2.1.0' //雷达刷新头 implementation 'io.github.scwang90:refresh-header-falsify:2.1.0' //虚拟刷新头 implementation 'io.github.scwang90:refresh-header-material:2.1.0' //谷歌刷新头 implementation 'io.github.scwang90:refresh-header-two-level:2.1.0' //二级刷新头 implementation 'io.github.scwang90:refresh-footer-ball:2.1.0' //球脉冲加载 implementation 'io.github.scwang90:refresh-footer-classics:2.1.0' //经典加载 implementation "androidx.viewpager2:viewpager2:1.0.0" implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' implementation 'com.wuyr:secondfloorbehavior:1.0.4' implementation 'com.google.android.flexbox:flexbox:3.0.0' implementation 'com.contrarywind:Android-PickerView:4.1.8' implementation(name: 'imagepicker-release', ext: 'aar') }