122 lines
3.8 KiB
Groovy
122 lines
3.8 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-kapt'
|
|
apply plugin: 'kotlin-parcelize'
|
|
apply plugin: 'com.google.dagger.hilt.android'
|
|
|
|
android {
|
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
|
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
|
|
|
signingConfigs {
|
|
wanandroid {
|
|
keyAlias 'wanandroid.keystore'
|
|
keyPassword 'wanandroid'
|
|
storeFile file('wanandroid.keystore')
|
|
storePassword 'wanandroid'
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId rootProject.ext.android.applicationId
|
|
minSdkVersion rootProject.ext.android.minSdkVersion
|
|
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
|
versionCode rootProject.ext.android.versionCode
|
|
versionName rootProject.ext.android.versionName
|
|
multiDexEnabled true
|
|
|
|
consumerProguardFiles "consumer-rules.pro"
|
|
|
|
javaCompileOptions {
|
|
annotationProcessorOptions {
|
|
arguments += [
|
|
"room.schemaLocation":"$projectDir/schemas".toString(),
|
|
"room.incremental":"true",
|
|
"room.expandProjection":"true",
|
|
AROUTER_MODULE_NAME: project.getName()
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
shrinkResources true // 移除无用的resource文件
|
|
zipAlignEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
signingConfig signingConfigs.wanandroid
|
|
}
|
|
debug {//开发自己的debug包
|
|
initWith release
|
|
debuggable true
|
|
minifyEnabled false
|
|
shrinkResources false // 移除无用的resource文件
|
|
proguardFiles.clear() // 不混淆
|
|
signingConfig signingConfigs.wanandroid
|
|
}
|
|
}
|
|
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
|
}
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
|
|
lintOptions {
|
|
checkReleaseBuilds false
|
|
// Or, if you prefer, you can continue to check for errors in release builds,
|
|
// but continue the build even when errors are found:
|
|
abortOnError false
|
|
}
|
|
|
|
}
|
|
|
|
kapt {
|
|
arguments {
|
|
arg("AROUTER_MODULE_NAME", project.getName())
|
|
}
|
|
generateStubs = true
|
|
useBuildCache = true
|
|
javacOptions {
|
|
option("-Xmaxerrs", 500)
|
|
}
|
|
}
|
|
|
|
def isBuildModule = rootProject.ext.module.isBuildModule
|
|
|
|
dependencies {
|
|
|
|
implementation project(":common:common-base")
|
|
implementation project(":common:common-service")
|
|
if (!Boolean.valueOf(isBuildModule)) {
|
|
implementation project(":modules:module-content")
|
|
implementation project(":modules:module-login")
|
|
implementation project(":modules:module-home")
|
|
implementation project(":modules:module-wechat")
|
|
implementation project(":modules:module-sys")
|
|
implementation project(":modules:module-square")
|
|
implementation project(":modules:module-project")
|
|
// implementation project(":modules:module-compose")
|
|
implementation project(":modules:module-collect")
|
|
implementation project(":modules:module-media")
|
|
}
|
|
|
|
implementation rootProject.ext.roomLibs
|
|
kapt rootProject.ext.compiler["roomCompiler"]
|
|
|
|
implementation rootProject.ext.other["rvHelper"]
|
|
|
|
kapt rootProject.ext.compiler["arouterCompiler"]
|
|
|
|
compileOnly(rootProject.ext.jetpack["hilt"])
|
|
kapt rootProject.ext.compiler["hiltAndroidCompiler"]
|
|
|
|
debugImplementation "io.github.didi.dokit:dokitx:3.5.0"
|
|
} |