Skip to content

Commit

Permalink
Update compat to use env if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-v-in committed Oct 3, 2015
1 parent dbe48e5 commit 5f22b0a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions unifiednlp-compat/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@

apply plugin: 'java'

Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def sdkDir = properties.getProperty('sdk.dir')
def sdkDir = System.env.ANDROID_HOME
if (!sdkDir) {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
sdkDir = properties.getProperty('sdk.dir')
}

sourceSets.main {
java.srcDirs = ['src/current/java', 'src/v9/java']
compileClasspath += project.rootProject.files("$sdkDir/platforms/android-22/android.jar")
compileClasspath += project.rootProject.files("$sdkDir/platforms/android-23/android.jar")
}

0 comments on commit 5f22b0a

Please sign in to comment.