Skip to content

Instantly share code, notes, and snippets.

@anothem
Created September 17, 2015 20:31
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anothem/9f1a8fc3fb6c5cafd5a5 to your computer and use it in GitHub Desktop.
Save anothem/9f1a8fc3fb6c5cafd5a5 to your computer and use it in GitHub Desktop.
Disable preDex
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
subprojects {
project.plugins.whenPluginAdded { plugin ->
if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
} else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment