2020-08-26 18:57:04 +08:00
|
|
|
import com.quyunshuo.androidbaseframemvvm.build.*
|
|
|
|
|
|
2020-08-26 17:29:44 +08:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
|
|
|
|
|
|
android {
|
2020-08-26 18:57:04 +08:00
|
|
|
compileSdkVersion BuildConfig.compileSdkVersion
|
|
|
|
|
buildToolsVersion BuildConfig.buildToolsVersion
|
2020-08-26 17:29:44 +08:00
|
|
|
|
|
|
|
|
defaultConfig {
|
2020-08-26 18:57:04 +08:00
|
|
|
applicationId BuildConfig.applicationId
|
|
|
|
|
minSdkVersion BuildConfig.minSdkVersion
|
|
|
|
|
targetSdkVersion BuildConfig.targetSdkVersion
|
|
|
|
|
versionCode BuildConfig.versionCode
|
|
|
|
|
versionName BuildConfig.versionName
|
2020-08-27 00:46:09 +08:00
|
|
|
testInstrumentationRunner AndroidX.AndroidJUnitRunner
|
2020-08-29 16:01:33 +08:00
|
|
|
multiDexKeepProguard file("multidexKeep.pro")
|
2020-08-26 17:29:44 +08:00
|
|
|
}
|
|
|
|
|
|
2020-08-27 16:17:26 +08:00
|
|
|
// signingConfigs {
|
|
|
|
|
// releaseConfig {
|
|
|
|
|
// storeFile file('')
|
|
|
|
|
// storePassword ""
|
|
|
|
|
// keyAlias ""
|
|
|
|
|
// keyPassword ""
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
2020-08-26 17:29:44 +08:00
|
|
|
buildTypes {
|
|
|
|
|
release {
|
2020-08-27 16:17:26 +08:00
|
|
|
// signingConfig signingConfigs.releaseConfig
|
2020-08-26 17:29:44 +08:00
|
|
|
minifyEnabled false
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
2020-08-27 16:17:26 +08:00
|
|
|
applicationVariants.all { variant ->
|
|
|
|
|
variant.outputs.all { output ->
|
|
|
|
|
if (outputFileName != null
|
|
|
|
|
&& outputFileName.endsWith('.apk')
|
|
|
|
|
&& 'release' == variant.buildType.name) {
|
|
|
|
|
outputFileName = "${BuildConfig.applicationId}_${defaultConfig.versionCode}(${defaultConfig.versionName}).apk"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-08-26 17:29:44 +08:00
|
|
|
}
|
2020-08-27 16:17:26 +08:00
|
|
|
debug {
|
|
|
|
|
minifyEnabled false
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
|
|
|
applicationVariants.all { variant ->
|
|
|
|
|
variant.outputs.all { output ->
|
|
|
|
|
if (outputFileName != null
|
|
|
|
|
&& outputFileName.endsWith('.apk')
|
|
|
|
|
&& 'debug' == variant.buildType.name) {
|
|
|
|
|
outputFileName = "${BuildConfig.applicationId}_${defaultConfig.versionCode}(${defaultConfig.versionName}).apk"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
2020-08-26 17:29:44 +08:00
|
|
|
}
|
2020-08-27 00:46:09 +08:00
|
|
|
|
2020-08-27 16:17:26 +08:00
|
|
|
kotlinOptions {
|
|
|
|
|
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
2020-08-27 00:46:09 +08:00
|
|
|
}
|
2020-08-26 17:29:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
2020-08-27 16:17:26 +08:00
|
|
|
if (!BuildConfig.isAppMode) {
|
|
|
|
|
implementation project(path: ':Lib_Main')
|
|
|
|
|
} else {
|
2020-08-27 17:08:52 +08:00
|
|
|
implementation project(path: ':Lib_Common')
|
2020-08-27 16:17:26 +08:00
|
|
|
}
|
2020-08-26 17:29:44 +08:00
|
|
|
}
|