Skip to content

Commit

Permalink
Better pre-dex control.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Jan 23, 2014
1 parent f76293a commit ce8b3ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ dependencies {
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
def buildTime = new Date().format("yyyy-MM-dd'T'HH:mm'Z'", TimeZone.getTimeZone("UTC"))

def isTravis = "true".equals(System.getenv("TRAVIS"))
def preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))

android {
compileSdkVersion 19
buildToolsVersion "19.0.1"

dexOptions {
// Skip pre-dexing when running on Travis CI.
preDexLibraries = !"true".equals(System.getenv("TRAVIS"))
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
preDexLibraries = preDexEnabled && !isTravis
}

defaultConfig {
Expand Down

0 comments on commit ce8b3ed

Please sign in to comment.