diff --git a/gradle/javaproject.gradle b/gradle/javaproject.gradle index 3248e256453e1ca791d2a48bbb5be239139d13ac..5387eb2a2a904120d0b8212a6884be73d7e74806 100644 --- a/gradle/javaproject.gradle +++ b/gradle/javaproject.gradle @@ -7,9 +7,7 @@ task wrapper(type: Wrapper) { gradleVersion = '1.8' distributionUrl = "http://svncisd.ethz.ch/repos/cisd/ivy-repository/trunk/gradle/distribution/1.8/gradle-1.8-all.zip" } - -addSource = (sourceCompatibility == org.gradle.api.JavaVersion.VERSION_1_6) -print "Current JVM is "+sourceCompatibility+", explicit ecj source compability: "+addSource +print "Current JVM is "+sourceCompatibility sourceCompatibility='1.6' targetCompatibility='1.6' @@ -134,13 +132,8 @@ compileJava { doFirst { options.forkOptions.with { executable = 'java' - if (addSource) { - jvmArgs = ['-cp', configurations.ecj.asPath, 'org.eclipse.jdt.internal.compiler.batch.Main', - '-nowarn', '-source', '1.6'] - } else { - jvmArgs = ['-cp', configurations.ecj.asPath, 'org.eclipse.jdt.internal.compiler.batch.Main', - '-nowarn'] - } + jvmArgs = ['-cp', configurations.ecj.asPath, 'org.eclipse.jdt.internal.compiler.batch.Main', + '-nowarn', '-source', '1.6' ] } } } @@ -151,13 +144,8 @@ compileTestJava { doFirst { options.forkOptions.with { executable = 'java' - if (addSource) { - jvmArgs = ['-cp', configurations.ecj.asPath, 'org.eclipse.jdt.internal.compiler.batch.Main', - '-nowarn', '-source', '1.6'] - } else { - jvmArgs = ['-cp', configurations.ecj.asPath, 'org.eclipse.jdt.internal.compiler.batch.Main', - '-nowarn'] - } + jvmArgs = ['-cp', configurations.ecj.asPath, 'org.eclipse.jdt.internal.compiler.batch.Main', + '-nowarn', '-source', '1.6' ] } } }