android gradle - How to disable Dexguard? -
i went through documentation looking way how disable dexguard when running gradle keeping plugin: 'dexguard'.
i tried modify proguardfile getdefaultdexguardfile('dexguard-debug.pro') nothing unfortunately no luck. need set no dexguard functionality functional testing suit monkeytalk cannot instrument apk now.
how turn dexguard functionality off?
update zatziky's answer current android gradle plugin (v1.0+) , dexguard plugin (6.1.+)
to create dexguard plugin switch may following
in root build.gradle
add property ext
(or create if not done yet, see here why that)
ext { enabledexguardplugin = false .... }
in app build.gradle add plugin this:
apply plugin: 'com.android.application' if(rootproject.ext.enabledexguardplugin) { apply plugin: 'dexguard' }
and if have library projects this
apply plugin: 'com.android.library' if(rootproject.ext.enabledexguardplugin) { apply plugin: 'dexguard' }
remove proguard configs debug build-types (especially getdefaultdexguardfile('dexguard-release.pro')
) if dont need them. unfortunatly @ least lib projects, buil-types build in assembledebug, have provide stub getdefaultdexguardfile
zatziky said:
private file getdefaultdexguardfile(string name) { new file(name) }
you may add root build.gradle
every script has it.
now if expected huge performance benefits may disapointed. key disable minifyenabled
on debug builds, since said before gradle android dumb , builds build-types (at least libs). may use property above it: enabledexguardplugin
release { ... minifyenabled rootproject.ext.enabledexguardplugin ... }
Comments
Post a Comment