Skip to content

Commit

Permalink
Create method for getting JDK path based on system
Browse files Browse the repository at this point in the history
  • Loading branch information
fzy-github committed Feb 28, 2016
1 parent 36f22b2 commit 2ac719c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,13 @@ dependencies {
}

retrolambda {
jdk getProperty("JAVA_HOME")
jdk getJDKPath()
}

def getJDKPath() {
if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
return getProperty("JAVA_HOME")
} else {
return System.getenv("JAVA_HOME")
}
}
Binary file added app/libs/library.aar
Binary file not shown.
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

#used on mac os to define JDK path for retrolambda
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home

0 comments on commit 2ac719c

Please sign in to comment.