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 | |
} | |
} | |
} |