mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 18:07:55 +00:00
Do not minify on debug
This commit is contained in:
parent
5e1b47db63
commit
2cfb506626
@ -1,8 +1,6 @@
|
|||||||
import com.github.jk1.license.LicenseReportExtension
|
import com.github.jk1.license.LicenseReportExtension
|
||||||
import com.github.jk1.license.render.ReportRenderer
|
import com.github.jk1.license.render.ReportRenderer
|
||||||
import com.github.jk1.license.render.TextReportRenderer
|
import com.github.jk1.license.render.TextReportRenderer
|
||||||
import java.io.FileNotFoundException
|
|
||||||
import java.util.Properties
|
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -99,22 +97,10 @@ android {
|
|||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
getByName("debug") {
|
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).
|
isMinifyEnabled = false
|
||||||
// If you want to locally disable this behavior to speed-up the build, add a line `disableMinifyDebug=true` to your `local.properties` file.
|
isShrinkResources = false
|
||||||
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
|
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
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") {
|
getByName("release") {
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
isShrinkResources = true
|
isShrinkResources = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user