76 lines
2.0 KiB
Groovy
76 lines
2.0 KiB
Groovy
if (isBuildModule.toBoolean()) {
|
|
apply plugin: 'com.android.application'
|
|
} else {
|
|
apply plugin: 'com.android.library'
|
|
}
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
kapt {
|
|
arguments {
|
|
arg("AROUTER_MODULE_NAME", project.getName())
|
|
}
|
|
}
|
|
|
|
android {
|
|
compileSdk 31
|
|
|
|
sourceSets {
|
|
main{
|
|
// 应用
|
|
if(isBuildModule.toBoolean()){
|
|
manifest.srcFile 'src/main/debug/AndroidManifest.xml'
|
|
}else{// 插件
|
|
manifest.srcFile 'src/main/release/AndroidManifest.xml'
|
|
}
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
if (isBuildModule.toBoolean()) {
|
|
applicationId "com.lukouguoji.hangban"
|
|
}
|
|
minSdkVersion 24
|
|
targetSdkVersion 30
|
|
versionCode 1
|
|
versionName "1.0"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '1.8'
|
|
}
|
|
buildToolsVersion '30.0.3'
|
|
|
|
buildFeatures {
|
|
dataBinding = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
api project(':module_base')
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
implementation 'androidx.core:core-ktx:1.2.0'
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
|
implementation 'com.google.android.material:material:1.2.1'
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
testImplementation 'junit:junit:4.+'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
|
|
|
kapt 'com.alibaba:arouter-compiler:1.5.2'
|
|
} |