2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 01:51:47 +00:00

Do not minify on debug

This commit is contained in:
Albert Vaca Cintora 2024-05-20 19:05:17 +02:00
parent 5e1b47db63
commit 2cfb506626
No known key found for this signature in database

View File

@ -1,8 +1,6 @@
import com.github.jk1.license.LicenseReportExtension
import com.github.jk1.license.render.ReportRenderer
import com.github.jk1.license.render.TextReportRenderer
import java.io.FileNotFoundException
import java.util.Properties
buildscript {
dependencies {
@ -99,22 +97,10 @@ android {
}
buildTypes {
getByName("debug") {
// We minify by default even on debug builds. This has helped us catch issues where minification would remove files that were actually used (eg: via reflection).
// If you want to locally disable this behavior to speed-up the build, add a line `disableMinifyDebug=true` to your `local.properties` file.
val reader = try {
rootProject.file("local.properties").reader()
} catch (e: FileNotFoundException) {
null
}
val properties = reader?.use { Properties().apply { load(it) } }
val disableMinifyDebug = properties?.getProperty("disableMinifyDebug")?.toBoolean() ?: false
isMinifyEnabled = !disableMinifyDebug
isShrinkResources = !disableMinifyDebug
isMinifyEnabled = false
isShrinkResources = false
signingConfig = signingConfigs.getByName("debug")
}
// keep minifyEnabled false above for faster builds; set to 'true'
// when testing to make sure ProGuard/R8 is not deleting important stuff
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true