mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 03:17:03 +05:30
build: refactor for configuration cache compatibility
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
7d1b36c7fb
commit
7c2528f4a7
4 changed files with 47 additions and 28 deletions
|
@ -59,6 +59,7 @@ internal fun Project.configureForAllProjects() {
|
|||
*/
|
||||
@Suppress("UnstableApiUsage")
|
||||
internal fun BaseAppModuleExtension.configureAndroidApplicationOptions(project: Project) {
|
||||
val minifySwitch = project.providers.environmentVariable("DISABLE_MINIFY").forUseAtConfigurationTime()
|
||||
project.tasks.withType<KotlinCompile> {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = freeCompilerArgs + listOf(
|
||||
|
@ -68,6 +69,17 @@ internal fun BaseAppModuleExtension.configureAndroidApplicationOptions(project:
|
|||
)
|
||||
}
|
||||
}
|
||||
adbOptions.installOptions("--user 0")
|
||||
buildTypes {
|
||||
named("release") {
|
||||
isMinifyEnabled = !minifySwitch.isPresent
|
||||
setProguardFiles(listOf("proguard-android-optimize.txt", "proguard-rules.pro"))
|
||||
}
|
||||
named("debug") {
|
||||
versionNameSuffix = "-debug"
|
||||
isMinifyEnabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue