-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Disable Obfuscation #7
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,10 +33,17 @@ android { | |
} | ||
} | ||
buildTypes { | ||
debug { isMinifyEnabled = false } | ||
release { | ||
isMinifyEnabled = true | ||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") | ||
// for local builds, used to find shrinking issues | ||
val isMinify = project.hasProperty("minify") | ||
if (isMinify) { | ||
debug { | ||
// while isDebuggable is set to true no obfuscation takes place, | ||
// the shrinking phase will still remove unused classes | ||
isDebuggable = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. basically true is the default value here, it was added here basically just to make the comment more clear. When playing around I was wondering why the classes were not obfuscated when adding this. I tested the behavior by adding an "UnusedClass" to the SDK. Since shrinking is disabled in the SDK it was not removed from the corresponding build aar. However when building the TestApp with the minify parameter it was correctly removed during shrinking when it was unused from inside the TestApp. When the TestApp was using the class, it was correctly left intact |
||
|
||
isMinifyEnabled = true | ||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
} | ||
namespace = "org.eclipse.kuksa.testapp" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +0,0 @@ | ||
-keep,allowobfuscation,allowoptimization,allowshrinking class org.eclipse.kuksa.DataBrokerConnection { *; } | ||
-keep,allowobfuscation,allowoptimization,allowshrinking class org.eclipse.kuksa.DataBrokerConnector { *; } | ||
-keep,allowobfuscation,allowoptimization,allowshrinking class org.eclipse.kuksa.model.Property { *; } | ||
-keep,allowobfuscation,allowoptimization,allowshrinking interface org.eclipse.kuksa.PropertyObserver { *; } | ||
-keep,allowobfuscation,allowoptimization,allowshrinking class org.eclipse.kuksa.CoroutineCallback { *; } | ||
-keep,allowobfuscation,allowoptimization,allowshrinking class org.eclipse.kuksa.TimeoutConfig { *; } | ||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this parameter / property to my global gradle.properties to always have shrinking enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allright :)