apply plugin: 'com.android.application' apply plugin: 'com.jakewharton.butterknife' apply plugin: 'org.greenrobot.greendao' //apply plugin: 'realm-android'//Realm数据库 android { compileSdkVersion ANDROID_COMPILE_SDK_VERSION as int buildToolsVersion ANDROID_BUILD_TOOLS_VERSION defaultConfig { applicationId "com.sheep.jiuyan.samllsheep" minSdkVersion ANDROID_MIN_SDK_VERSION as int targetSdkVersion ANDORID_TARGET_SDK_VERSION as int versionCode VERSION_CODE as int versionName VERSION_NAME multiDexEnabled true testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" ndk { abiFilters "armeabi-v7a", 'x86'//, 'armeabi-v7a', 'x86_64', 'arm64-v8a' } // jackOptions { // enabled true // } multiDexEnabled true flavorDimensions "versionCode" } greendao { schemaVersion 11 targetGenDir 'src/main/java' } // compileOptions{ // sourceCompatibility org.gradle.api.JavaVersion.VERSION_1_8 // targetCompatibility org.gradle.api.JavaVersion.VERSION_1_8 // } signingConfigs { config { keyAlias 'sheep' keyPassword 'zhaoyi2004' storeFile file('.././sign.jks') storePassword 'zhaoyi2004' v1SigningEnabled true v2SigningEnabled false } } lintOptions { abortOnError false disable 'MissingTranslation' } dexOptions { preDexLibraries = false javaMaxHeapSize "4g" } packagingOptions { exclude 'META-INF/services/com.fasterxml.jackson.core.JsonFactory' } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.config } debug { signingConfig signingConfigs.config } } productFlavors.all { flavor -> flavor.manifestPlaceholders = [DUANDUAN_GRAPH : "${flavor.name}", DUANDUAN_DATASHARE: "${flavor.name}", ] } productFlavors { developSheeptest { applicationId "com.sheep.jiuyan.samllsheep" manifestPlaceholders = [DUANDUAN_GRAPH : "sheeptest", DUANDUAN_DATASHARE: "sheeptest", jpush_appkey : "4fea09bdbf9661a9689ee306", umeng_app_key : "5ab0a1da8f4a9d742900035f" ] buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptest"' buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptest"' buildConfigField "String", "app_name", '"小绵羊测试"' buildConfigField "boolean", "XXTEA_ENCRYPT", 'true' buildConfigField "String", "API_DOMAIN", '"app.ss.kfzs.com"' signingConfig signingConfigs.config } // sheeptestjiguang { // applicationId "com.sheep.jiuyan.samllsheep.test" // manifestPlaceholders = [DUANDUAN_GRAPH : "sheeptestjiguang", // DUANDUAN_DATASHARE: "sheeptestjiguang", // jpush_appkey : "4fea09bdbf9661a9689ee306", // umeng_app_key : "5ab0a1da8f4a9d742900035f" // ] // buildConfigField "String", "DUANDUAN_DATASHARE", '"sheeptestjiguang"' // buildConfigField "String", "DUANDUAN_GRAPH", '"sheeptestjiguang"' // buildConfigField "String", "app_name", '"小绵羊测试"' // buildConfigField "boolean", "XXTEA_ENCRYPT", 'true' // buildConfigField "String", "API_DOMAIN", '"app.ss.kfzs.com"' // signingConfig signingConfigs.config // } sheep { applicationId "com.sheep.jiuyan.samllsheep" manifestPlaceholders = [DUANDUAN_GRAPH : "sheep", DUANDUAN_DATASHARE: "sheep", jpush_appkey : "28b74d520261c6f78e3e0921", umeng_app_key : "5ab0a1da8f4a9d742900035f" ] buildConfigField "String", "DUANDUAN_DATASHARE", '"sheep"' buildConfigField "String", "DUANDUAN_GRAPH", '"sheep"' buildConfigField "String", "app_name", '"小绵羊"' buildConfigField "boolean", "XXTEA_ENCRYPT", 'true' buildConfigField "String", "API_DOMAIN", '"app.ss.kfzs.com"' signingConfig signingConfigs.config } } sourceSets { main() { jniLibs.srcDirs = ['src/main/libs'] jni.srcDirs = [] //屏蔽掉默认的jni编译生成过程 } } packagingOptions { pickFirst 'lib/armeabi-v7a/libgojni.so' pickFirst 'lib/arm64-v8a/libgojni.so' pickFirst 'lib/x86/libgojni.so' pickFirst 'lib/x86_64/libgojni.so' } } repositories { flatDir { dirs 'libs' } google() } dependencies { implementation project(':common') implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:support-v4:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' testImplementation 'junit:junit:4.12' implementation 'com.google.code.gson:gson:2.8.5' implementation('com.jcodecraeer:xrecyclerview:1.5.9') implementation 'com.squareup.okhttp3:okhttp:3.11.0' implementation 'org.greenrobot:eventbus:3.1.1' implementation 'com.zhy:base-adapter:3.0.3' implementation 'com.tencent.bugly:crashreport_upgrade:1.3.4' implementation 'com.tencent.bugly:nativecrashreport:3.3.1' implementation 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.1.6' debugImplementation('com.readystatesoftware.chuck:library:1.1.0') releaseImplementation('com.readystatesoftware.chuck:library-no-op:1.1.0') implementation 'org.xutils:xutils:3.5.0' implementation 'com.mylhyl:acp:1.1.7' implementation 'cn.yipianfengye.android:zxing-library:2.2' implementation 'com.github.huburt-Hu:NewbieGuide:v1.2.0' debugImplementation 'com.android.support:multidex:1.0.3' //不要修改这里,相信我 releaseImplementation 'com.android.support:multidex:1.0.3' implementation(name: 'com.kfzs.safe-201809211354', ext: 'aar') //butterknife implementation 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' compileOnly 'org.glassfish:javax.annotation:10.0-b28' implementation 'com.google.dagger:dagger:2.12' annotationProcessor 'com.google.dagger:dagger-compiler:2.12' //retrofit implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.4.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0' implementation 'com.squareup.retrofit2:adapter-rxjava:2.4.0' //rxjava implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' implementation 'io.reactivex.rxjava2:rxjava:2.2.2' //获取动态权限三方库 implementation 'pub.devrel:easypermissions:1.2.0' implementation 'net.danlew:android.joda:2.9.3' implementation 'com.orhanobut:logger:2.2.0' //友盟 implementation 'com.umeng.sdk:common:1.5.3' //fast json implementation 'com.alibaba:fastjson:1.2.48' //添加半袋米相关 implementation(name: 'appstoreutils-201810101432', ext: 'aar') implementation project(':view') implementation 'com.flipboard:bottomsheet-core:1.5.3' implementation 'com.flipboard:bottomsheet-commons:1.5.3' implementation files('libs/open_sdk_r5923_lite.jar') implementation files('libs/umeng_social_tool.jar') implementation files('libs/umeng_social_shareboard.jar') implementation files('libs/umeng_social_net.jar') implementation files('libs/umeng_social_api.jar') implementation files('libs/umeng_shareboard_widget.jar') implementation files('libs/SocialSDK_WeiXin_Full.jar') implementation files('libs/SocialSDK_QQ_Full.jar') implementation 'com.zhy:okhttputils:2.6.2' implementation 'com.kf.framework:kf-utils:1.4.5@aar' implementation 'com.kf.framework:volleyplus:1.4.5@aar' implementation "com.android.support:support-annotations:28.0.0" implementation "com.android.support:recyclerview-v7:28.0.0" implementation files('libs/jackson-core-2.2.1.jar') implementation files('libs/jackson-dataformat-xml-2.1.2.jar') implementation 'io.reactivex:rxandroid:1.2.1' implementation 'com.github.ithedan:TextViewDrawable:v1.0' implementation(name: 'PhotoPicker-release-201810081154', ext: 'aar') implementation 'com.github.bumptech.glide:glide:4.8.0' implementation project(':ucrop') implementation('com.arialyy.aria:aria-core:3.3.16') annotationProcessor 'com.arialyy.aria:aria-compiler:3.3.16' implementation 'com.sunfusheng:marqueeview:1.3.3' implementation files('libs/alipaySdk-20170922.jar') //极光 implementation files('libs/jcore-android-1.2.0.jar') implementation files('libs/jpush-android-3.1.2.jar') //定位 implementation files('libs/BaiduLBS_Android.jar') //幂动科技 implementation files('libs/mdsdk-201810121334.jar') //轮播图 implementation 'com.youth.banner:banner:1.4.10' //最新版本 //loading implementation 'com.github.ybq:Android-SpinKit:1.1.0' implementation files('libs/compresshelper-release.jar') implementation 'com.haibin:calendarview:3.4.4' implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0-alpha-14' implementation 'org.greenrobot:greendao:3.2.2' } static def releaseTime() { return new Date().format("MMddHHmm", TimeZone.getDefault()) } //在apk文件后边生成版本号信息 android.applicationVariants.all { variant -> variant.outputs.all { output -> if (buildType.name == "release") { outputFileName = productFlavors[0].name + "_" + buildType.name + "_v" + android.defaultConfig.versionName + "_" + android.defaultConfig.versionCode + "-${releaseTime()}.apk" } } }