if (isRelease.toBoolean()) { apply plugin: 'com.android.library' } else { apply plugin: 'com.android.application' } apply plugin: 'org.jetbrains.kotlin.android' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-parcelize' android { compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { if (!isRelease.toBoolean()) { applicationId "com.gh.floatingwindow" multiDexEnabled true } minSdk rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode rootProject.ext.versionCode versionName rootProject.ext.versionName buildConfigField "String", "API_HOST", "\"${API_HOST}\"" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildFeatures { viewBinding true } sourceSets { main { if (isRelease.toBoolean()) { manifest.srcFile 'src/main/AndroidManifest.xml' java { exclude 'manifest/**' } } else { java { srcDirs = ['src/main/java', "src/demo/java"] } manifest.srcFile 'src/main/manifest/AndroidManifest.xml' res.srcDirs = ['src/main/res','src/demo/res'] } } } kapt { arguments { arg("AROUTER_MODULE_NAME", project.name) } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } buildTypes { debug { if (!isRelease.toBoolean()) { buildConfigField "String", "DEV_API_HOST", "\"${DEV_API_HOST}\"" } } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' if (!isRelease.toBoolean()) { buildConfigField "String", "DEV_API_HOST", "\"${API_HOST}\"" } } } } dependencies { implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs') kapt "com.alibaba:arouter-compiler:$arouterVersion" if (!isRelease.toBoolean()) { implementation "androidx.multidex:multidex:${multiDex}" } implementation(project(path: ":module_common")) { exclude group: 'androidx.swiperefreshlayout' } implementation(project(':module_core_feature')) { exclude group: 'androidx.swiperefreshlayout' } implementation(project(path: ":module_login")) { exclude group: 'androidx.swiperefreshlayout' } implementation ("com.lg:easyfloat:${easyFloat}") }