Skip to content

Now findJavaCommand in lib.gradle is exposed and it is used by the other .gradle files. #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

import org.apache.tools.ant.taskdefs.condition.Os

defaultTasks 'build'

Boolean doSigning() {
Expand Down
9 changes: 1 addition & 8 deletions java8/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

import org.apache.tools.ant.taskdefs.condition.Os

jar {
baseName "${project.projectName}-${project.name}"
}
Expand All @@ -15,13 +13,8 @@ dependencies {
}

compileJava {
def jh = System.getenv("JAVA8_HOME")
if (jh == null) {
throw new Exception("JAVA8_HOME environment variable not set")
}
def extension = Os.isFamily(Os.FAMILY_WINDOWS) ? ".exe" : ""
options.fork = true
options.forkOptions.executable = "$jh$extension/bin/javac"
options.forkOptions.executable = findJavaCommand("javac")
}

uploadArchives.enabled = true
8 changes: 4 additions & 4 deletions lib.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ String findCommand(String dir, String command) {
cmd
}

String findJavaCommand(String s) {
String findJavaCommand(String command) {
def jh = System.getenv("JAVA8_HOME")
if (jh == null) {
throw new Exception("Environment variable JAVA8_HOME not set")
}
findCommand("$jh/bin", s)
findCommand("$jh/bin", command)
}

List<String> projectClasses(List<String> list, String base) {
Expand All @@ -36,10 +36,10 @@ def createDynamicJavadoc(String module, List<String> paths) {

ext {
createDynamicJavadoc = this.&createDynamicJavadoc
findJavaCommand = this.&findJavaCommand
}

task java8Javadoc(type: Exec) {
def c = findJavaCommand("javadoc")
commandLine c, "-sourcepath", "$projectDir/src/main/java", "-d", "$buildDir/docs/javadoc", "-subpackages", "fj", "-Xdoclint:none", "-quiet"
}

}