123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- apply plugin: 'com.android.application'
- apply plugin: 'com.jakewharton.butterknife'
- apply plugin: 'kotlin-android'
- apply plugin: 'kotlin-android-extensions'
- apply plugin: 'kotlin-kapt'
- // Create a variable called keystorePropertiesFile, and initialize it to your
- // keystore.properties file, in the rootProject folder.
- def keystorePropertiesFile = rootProject.file("keystore.properties")
- // Initialize a new Properties() object called keystoreProperties.
- def keystoreProperties = new Properties()
- // Load your keystore.properties file into the keystoreProperties object.
- keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
- // 编译时间
- static def buildTime() {
- return new Date().format("yyyyMMdd")
- }
- android {
- applicationVariants.all { variant ->
- variant.outputs.all {
- def time = new Date().format("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))
- if (variant.buildType.name == 'release') {
- outputFileName = "YouQi_" + "${variant.mergedFlavor.versionName}_release.apk"
- } else if (variant.buildType.name == 'debug') {
- outputFileName = "YouQi_" + "${variant.mergedFlavor.versionName}_debug.apk"
- }
- }
- }
- // 配置 签名
- signingConfigs {
- config {
- keyAlias keystoreProperties['keyAlias']
- keyPassword keystoreProperties['keyPassword']
- storeFile file(keystoreProperties['storeFile'])
- storePassword keystoreProperties['storePassword']
- }
- debug {
- keyAlias keystoreProperties['keyAlias']
- keyPassword keystoreProperties['keyPassword']
- storeFile file(keystoreProperties['storeFile'])
- storePassword keystoreProperties['storePassword']
- }
- release {
- keyAlias keystoreProperties['keyAlias']
- keyPassword keystoreProperties['keyPassword']
- storeFile file(keystoreProperties['storeFile'])
- storePassword keystoreProperties['storePassword']
- }
- }
- // signingConfigs {
- // config {
- // storeFile file('/Users/mac/Desktop/androidProject/key/youqi.jks')
- // storePassword 'jyf_20190830'
- // keyAlias = 'jinyunfu'
- // keyPassword 'jyf_20190830'
- // }
- // debug {
- // storeFile file('/Users/mac/Desktop/androidProject/key/youqi.jks')
- // storePassword 'jyf_20190830'
- // keyAlias = 'jinyunfu'
- // keyPassword 'jyf_20190830'
- // }
- // }
- compileSdkVersion build_versions.target_sdk
- defaultConfig {
- applicationId "com.shanp.youqi"
- minSdkVersion build_versions.min_sdk
- targetSdkVersion build_versions.target_sdk
- versionCode build_versions.version_code
- versionName build_versions.version_name
- multiDexEnabled true//打包时间
- resValue "string", "build_time", buildTime()
- ndk {
- //设置支持的SO库架构
- abiFilters "armeabi-v7a", 'arm64-v8a'
- }
- javaCompileOptions {
- annotationProcessorOptions {
- arguments = [AROUTER_MODULE_NAME: project.getName()]
- }
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- buildTypes {
- release {
- minifyEnabled true
- zipAlignEnabled true
- shrinkResources true
- signingConfig signingConfigs.config
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- buildConfigField("String", "SERVER", "\"https://logic.uqchat.cn\"")
- buildConfigField("String", "SERVER_ROOM_HOST", "\"chat.uqchat.cn\"")
- manifestPlaceholders = [RONG_CLOUD_APP_KEY: "n19jmcy5na779"]
- }
- debug {
- //给applicationId添加后缀“.debug”
- // applicationIdSuffix ".debug"
- //manifestPlaceholders = [app_icon: "@load/launch_beta"]
- signingConfig signingConfigs.debug
- buildConfigField "boolean", "LOG_DEBUG", "true"
- // buildConfigField("String", "SERVER", "\"http://192.168.2.91:8080\"")
- // buildConfigField("String", "SERVER", "\"http://192.168.2.68:8080\"")
- // buildConfigField("String", "SERVER", "\"https://logic.test.uqchat.cn\"")
- buildConfigField("String", "SERVER", "\"https://logic.test.uqchat.cn\"")
- buildConfigField("String", "SERVER_ROOM_HOST", "\"chat.test.uqchat.cn\"")
- manifestPlaceholders = [RONG_CLOUD_APP_KEY: "p5tvi9dspe334"]
- }
- }
- useLibrary 'org.apache.http.legacy'
- buildFeatures {
- dataBinding = true
- viewBinding = true
- }
- }
- dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation deps.support.multidex
- implementation deps.constraint_layout
- annotationProcessor deps.arouter_compiler
- kapt deps.arouter_compiler
- annotationProcessor deps.butterknife_annotationProcessor
- kapt deps.butterknife_annotationProcessor
- api project(':uchat_common')
- if (!isModule.toBoolean()) {
- implementation project(':uchat_account')
- implementation project(':uchat_user')
- implementation project(':uchat_im')
- implementation project(':uchat_room')
- implementation project(':uchat_plaza')
- implementation project(':uchat_topic')
- implementation project(':uchat_wallet')
- implementation project(':uchat_show')
- implementation project(':uchat_play')
- implementation project(':uchat_club')
- }
- debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
- releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
- }
|