| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309 |
- apply plugin: 'com.android.application'
- apply plugin: 'kotlin-android'
- apply plugin: 'kotlin-android-extensions'
- apply plugin: 'kotlin-kapt'
- apply plugin: 'realm-android'
- ext {
- //定义变量
- signingConfigKeyAlias = ""
- signingConfigKeyPassword = ""
- signingConfigStoreFilePath = ""
- signingConfigStorePassword = ""
- jpushAppKey = ""
- baiduSpeechAppId = ""
- baiduSpeechSecret = ""
- baiduSpeechAppKey = ""
- baiduMapAppKey = ""
- jpushIMPassword = ""
- buglyAppId = ""
- }
- def loadProperties() {
- Properties properties = new Properties()
- properties.load(project.rootProject.file('local.properties').newDataInputStream())
- project.signingConfigKeyAlias = properties.getProperty("signingConfig.keyAlias")
- project.signingConfigKeyPassword = properties.getProperty("signingConfig.keyPassword")
- project.signingConfigStoreFilePath = properties.getProperty("signingConfig.storeFilePath")
- project.signingConfigStorePassword = properties.getProperty("signingConfig.storePassword")
- //release key
- project.jpushAppKey = properties.getProperty("JPUSH_APPKEY")
- project.baiduSpeechAppId = properties.getProperty("BAIDU_SPEECH_APPID")
- project.baiduSpeechSecret = properties.getProperty("BAIDU_SPEECH_SECRET")
- project.baiduSpeechAppKey = properties.getProperty("BAIDU_SPEECH_APPKEY")
- project.baiduMapAppKey = properties.getProperty("BAIDU_MAP_APPKEY")
- project.jpushIMPassword = properties.getProperty("JM_IM_USER_PASSWORD")
- project.buglyAppId = properties.getProperty("BUGLY_APPID")
- }
- loadProperties()
- task printVersionName {
- def v = project.property("o2.versionName").toString()
- println("${v}")
- }
- android {
- compileSdkVersion 26
- buildToolsVersion "27.0.3"
- sourceSets {
- main {
- jniLibs.srcDir 'libs'
- assets.srcDirs = ['assets']
- res.srcDirs = ['src/main/res', 'src/main/res/raw']
- }
- }
- signingConfigs {
- release {
- v1SigningEnabled true
- v2SigningEnabled true
- keyAlias project.signingConfigKeyAlias
- keyPassword project.signingConfigKeyPassword
- storeFile file(project.signingConfigStoreFilePath)
- storePassword project.signingConfigStorePassword
- }
- debug {
- v1SigningEnabled true
- v2SigningEnabled true
- keyAlias 'androiddebugkey'
- storeFile file('debug.keystore')
- keyPassword 'android'
- }
- }
- defaultConfig {
- applicationId "net.zoneland.x.bpm.mobile.v1.zoneXBPM"
- minSdkVersion 19
- targetSdkVersion 26
- versionCode project.property("o2.versionCode").toInteger()
- versionName project.property("o2.versionName").toString()
- multiDexEnabled true
- ndk {
- //选择要添加的对应cpu类型的.so库。
- abiFilters 'armeabi', 'armeabi-v7a'
- }
- multiDexKeepProguard file('multidex_keep_file.pro')
- vectorDrawables.useSupportLibrary = true
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- buildTypes {
- debug {
- signingConfig signingConfigs.debug
- buildConfigField "Boolean", "InnerServer", "true"
- buildConfigField "Boolean", "LOG_ENABLE", "true"
- buildConfigField "Boolean", "LOG_FILE", "true"
- manifestPlaceholders = [JPUSH_PKGNAME : defaultConfig.applicationId,
- JPUSH_APPKEY : project.jpushAppKey,
- JM_IM_USER_PASSWORD: project.jpushIMPassword,
- BAIDU_SPEECH_APPID : project.baiduSpeechAppId,
- BAIDU_SPEECH_SECRET: project.baiduSpeechSecret,
- BAIDU_SPEECH_APPKEY: project.baiduSpeechAppKey,
- BAIDU_MAP_APPKEY : project.baiduMapAppKey,
- BUGLY_APPID : project.buglyAppId]
- }
- release {
- signingConfig signingConfigs.release
- buildConfigField "Boolean", "InnerServer", "false"
- buildConfigField "Boolean", "LOG_ENABLE", "false"
- buildConfigField "Boolean", "LOG_FILE", "true"
- manifestPlaceholders = [JPUSH_PKGNAME : defaultConfig.applicationId,
- JPUSH_APPKEY : project.jpushAppKey,
- JM_IM_USER_PASSWORD: project.jpushIMPassword,
- BAIDU_SPEECH_APPID : project.baiduSpeechAppId,
- BAIDU_SPEECH_SECRET: project.baiduSpeechSecret,
- BAIDU_SPEECH_APPKEY: project.baiduSpeechAppKey,
- BAIDU_MAP_APPKEY : project.baiduMapAppKey,
- BUGLY_APPID : project.buglyAppId]
- zipAlignEnabled true
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- //apk包重命名
- applicationVariants.all { variant ->
- variant.outputs.all {
- outputFileName = "${variant.productFlavors[0].name}-${variant.versionName}.apk"
- }
- }
- }
- }
- dataBinding {
- enabled true
- }
- android {
- lintOptions {
- abortOnError false
- }
- }
- lintOptions {
- checkReleaseBuilds false
- abortOnError false
- }
- flavorDimensions "type"
- productFlavors {
- O2PLATFORM {
- manifestPlaceholders = [JPUSH_CHANNEL: "pgy"]
- }
- huawei {
- manifestPlaceholders = [JPUSH_CHANNEL: "huawei"]
- }
- xiaomi {
- manifestPlaceholders = [JPUSH_CHANNEL: "xiaomi"]
- }
- }
- }
- buildscript {
- repositories {
- mavenCentral()
- }
- dependencies {
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
- }
- }
- repositories {
- flatDir {
- dirs 'libs'
- }
- }
- dependencies {
- implementation files('libs/BaiduLBS_Android.jar')
- implementation files('libs/bdasr_V3_20180320_9066860.jar')
- implementation files('libs/com.baidu.tts_2.3.1.20170808_e39ea89.jar')
- implementation files('libs/zxing.jar')
- implementation files('libs/pinyin4j-2.5.0.jar')
- implementation files('libs/universal-image-loader-1.9.5.jar')
- implementation files('libs/tbs_sdk_thirdapp_v4.3.0.1072_43646_sharewithdownloadwithfile_withoutGame_obfs_20190429_175122.jar')
- implementation(name: 'material-calendarview-fancy-1.1', ext: 'aar')
- // implementation(name: 'o2_auth_sdk-release', ext: 'aar')
- implementation project(path: ':o2_auth_sdk')
- implementation(name: 'flutterpack-release', ext: 'aar')
- implementation(name: 'shared_preferences-release', ext: 'aar')
- implementation(name: 'image_picker-release', ext: 'aar')
- implementation(name: 'path_provider-release', ext: 'aar')
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation "org.jetbrains.anko:anko-common:$anko_version"
- implementation('com.android.support:support-v4:26.1.0') {
- force = true
- }
- implementation('com.android.support:recyclerview-v7:26.1.0') {
- exclude module: 'support-v4'
- }
- implementation 'com.android.support:appcompat-v7:26.1.0'
- implementation 'com.android.support:cardview-v7:26.1.0'
- implementation 'com.android.support:design:26.1.0'
- implementation 'com.android.support.constraint:constraint-layout:1.1.3'
- implementation 'com.android.support:multidex:1.0.3'
- implementation 'com.github.PhilJay:MPAndroidChart:v2.2.4'
- implementation('com.github.bumptech.glide:glide:3.7.0') {
- force = true
- }
- implementation 'com.afollestad.material-dialogs:core:0.8.5.9'
- implementation 'net.muliba.fancyfilepickerlibrary:fancyfilepickerlibrary:3.0.2'
- implementation 'net.muliba.changeskin:changeskin:1.2.2'
- implementation 'io.o2oa:signatureview:1.0.0'
- implementation 'net.zoneland.o2.calendarview:library:1.1.2'
- implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3'
- implementation 'com.facebook.shimmer:shimmer:0.1.0@aar'
- implementation 'com.borax12.materialdaterangepicker:library:1.9'
- implementation 'com.yanzhenjie:recyclerview-swipe:1.1.4'
- implementation 'com.race604.waveloading:library:1.1.1'
- implementation 'com.squareup.retrofit2:retrofit:2.4.0'
- implementation 'com.squareup.retrofit2:converter-gson:2.2.0'
- implementation 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
- implementation 'com.squareup.okhttp3:okhttp:3.11.0'
- implementation 'io.reactivex:rxjava:1.1.6'
- implementation 'io.reactivex:rxandroid:1.2.1'
- implementation 'com.tencent.bugly:crashreport:2.6.6'
- //
- implementation 'cn.jiguang.sdk:jpush:3.1.2'
- implementation 'cn.jiguang.sdk:jmessage:2.5.0'
- // 此处以JMessage 2.5.0 版本为例。
- implementation 'cn.jiguang.sdk:jcore:1.1.9'
- //im
- implementation 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
- implementation 'com.jakewharton:butterknife:8.4.0'
- kapt 'com.jakewharton:butterknife-compiler:8.4.0'
- implementation 'com.github.chrisbanes.photoview:library:1.2.4'
- implementation 'com.facebook.fresco:fresco:0.8.1'
- implementation 'org.greenrobot:eventbus:3.0.0'
- implementation 'com.contrarywind:Android-PickerView:3.2.4'
- //滚动选择器
- implementation 'com.jzxiang.pickerview:TimePickerDialog:1.0.1'
- //链式方式获取Activity返回结果
- implementation 'com.github.lwugang:ActivityResult:59b23e3682'
- //google architecture component
- def lifecycle_version = "1.1.1"
- // ViewModel and LiveData
- implementation "android.arch.lifecycle:extensions:$lifecycle_version"
- // alternatively - just ViewModel
- implementation "android.arch.lifecycle:viewmodel:$lifecycle_version"
- // use -ktx for Kotlin
- // alternatively - just LiveData
- implementation "android.arch.lifecycle:livedata:$lifecycle_version"
- // Support library depends on this lightweight import
- implementation "android.arch.lifecycle:runtime:$lifecycle_version"
- annotationProcessor "android.arch.lifecycle:compiler:$lifecycle_version"
- //noinspection GradleDependency
- kapt "com.android.databinding:compiler:$gradle_version"
- testImplementation 'junit:junit:4.12'
- implementation 'com.google.code.gson:gson:2.8.5'
- }
- tasks.whenTaskAdded { task ->
- if (task.name == "lint") {
- task.enabled = false
- }
- }
|