diff --git a/build.gradle b/build.gradle index eb536f4d1..d71fd8517 100644 --- a/build.gradle +++ b/build.gradle @@ -13,3 +13,15 @@ allprojects { jcenter() } } + +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 + } + } +} \ No newline at end of file diff --git a/circle.yml b/circle.yml index ad1d0980e..f10bb66de 100644 --- a/circle.yml +++ b/circle.yml @@ -11,7 +11,7 @@ test: parallel: true - circle-android wait-for-boot - adb shell input keyevent 82 - - ./gradlew connectedAndroidTest + - ./gradlew -PdisablePreDex connectedAndroidTest - cp -r app/build/outputs $CIRCLE_ARTIFACTS || echo ok - cp -r app/build/reports/androidTests/connected/* $CIRCLE_TEST_REPORTS || echo ok - adb logcat -d > $CIRCLE_TEST_REPORTS/logcat.txt \ No newline at end of file