From 3656c51e95d29a7b3576f93832f8d995b9e7a3f6 Mon Sep 17 00:00:00 2001 From: Alinson Xavier Date: Thu, 24 Mar 2016 22:14:54 -0400 Subject: [PATCH] Disable pre-dexing --- build.gradle | 12 ++++++++++++ circle.yml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) 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