From 58822faf7dd30fa48612cefa88f67255b477b595 Mon Sep 17 00:00:00 2001 From: Tom Hennen Date: Sat, 5 Sep 2015 11:40:17 -0400 Subject: [PATCH] disable predexing to get CircleCI doing a full build --- build.gradle | 15 +++++++++++++++ circle.yml | 3 +++ 2 files changed, 18 insertions(+) diff --git a/build.gradle b/build.gradle index 9f8861d13..5ecba88d5 100644 --- a/build.gradle +++ b/build.gradle @@ -19,6 +19,21 @@ allprojects { } } +// Disable predex if requested (we can't predex in Circle CI +// See http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance +// and https://circleci.com/docs/android +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 + } + } +} + task wrapper(type: Wrapper) { gradleVersion = '2.4' } \ No newline at end of file diff --git a/circle.yml b/circle.yml index abd78de2b..901515669 100644 --- a/circle.yml +++ b/circle.yml @@ -1,3 +1,6 @@ machine: java: version: oraclejdk8 +test: + override: + - ./gradlew assembleDebug -PdisablePreDex \ No newline at end of file