You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/08/25 08:05:17 UTC
[lucene] 02/12: Revert "Adding initial patch by Gautam Worah"
(restore pristine main)
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
commit 523cea2c5d91473abc397a56f7b98d8ecc1f4e72
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Fri Aug 20 08:18:33 2021 +0200
Revert "Adding initial patch by Gautam Worah" (restore pristine main)
This reverts commit 067ab4f503aabea59639e692e3ea9ee30750c68e.
---
gradle/java/javac.gradle | 9 --
gradle/testing/alternative-jdk-support.gradle | 114 +++++++++++++-------------
gradle/wrapper/gradle-wrapper.jar.version | 2 +-
gradle/wrapper/gradle-wrapper.properties | 2 +-
4 files changed, 59 insertions(+), 68 deletions(-)
diff --git a/gradle/java/javac.gradle b/gradle/java/javac.gradle
index a152919..78c5fb4 100644
--- a/gradle/java/javac.gradle
+++ b/gradle/java/javac.gradle
@@ -16,15 +16,6 @@
*/
// Configure Java project defaults.
-java {
- toolchain {
- languageVersion = JavaLanguageVersion.of(11)
- }
-}
-
-tasks.withType( JavaCompile ).configureEach {
- options.forkOptions.jvmArgs.addAll( ['--add-opens', 'jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED'] )
-}
allprojects {
plugins.withType(JavaPlugin) {
diff --git a/gradle/testing/alternative-jdk-support.gradle b/gradle/testing/alternative-jdk-support.gradle
index fe4027e..2b252af 100644
--- a/gradle/testing/alternative-jdk-support.gradle
+++ b/gradle/testing/alternative-jdk-support.gradle
@@ -18,60 +18,60 @@
// This adds support for compiling and testing against a different Java runtime.
// This is the only way to build against JVMs not yet supported by Gradle itself.
-//JavaInstallationRegistry registry = extensions.getByType(JavaInstallationRegistry)
-//
-//JavaInstallation currentJvm = registry.installationForCurrentVirtualMachine.get()
-//
-//JavaInstallation altJvm = {
-// def runtimeJavaHome = propertyOrDefault("runtime.java.home", System.getenv('RUNTIME_JAVA_HOME'))
-// if (!runtimeJavaHome) {
-// return currentJvm
-// } else {
-// return registry.installationForDirectory(
-// layout.projectDirectory.dir(runtimeJavaHome)).get()
-// }
-//}()
-//
-//// Set up root project's property.
-//rootProject.ext.runtimeJava = altJvm
-rootProject.ext.runtimeJavaVersion = JavaVersion.VERSION_11
-//
-//if (!currentJvm.javaExecutable.equals(altJvm.javaExecutable)) {
-// // Set up java toolchain tasks to use the alternative Java.
-// // This is a related Gradle issue for the future:
-// // https://github.com/gradle/gradle/issues/1652
-//
-// configure(rootProject) {
-// task altJvmWarning() {
-// doFirst {
-// logger.warn("""NOTE: Alternative java toolchain will be used for compilation and tests:
-// Project will use Java ${altJvm.javaVersion} from: ${altJvm.installationDirectory}
-// Gradle runs with Java ${currentJvm.javaVersion} from: ${currentJvm.installationDirectory}
-//""")
-// }
-// }
-// }
-//
-// // Set up toolchain-dependent tasks to use the alternative JVM.
-// allprojects {
-// // Any tests
-// tasks.withType(Test) {
-// dependsOn ":altJvmWarning"
-// executable = altJvm.javaExecutable
-// }
-//
-// // Any javac compilation tasks
-// tasks.withType(JavaCompile) {
-// dependsOn ":altJvmWarning"
-// options.fork = true
-// options.forkOptions.javaHome = altJvm.installationDirectory.asFile
-// }
-//
-// // Javadoc compilation.
-// def javadocExecutable = altJvm.jdk.get().javadocExecutable.asFile
-// tasks.matching { it.name == "renderJavadoc" || it.name == "renderSiteJavadoc" }.all {
-// dependsOn ":altJvmWarning"
-// executable = javadocExecutable
-// }
-// }
-//}
+JavaInstallationRegistry registry = extensions.getByType(JavaInstallationRegistry)
+
+JavaInstallation currentJvm = registry.installationForCurrentVirtualMachine.get()
+
+JavaInstallation altJvm = {
+ def runtimeJavaHome = propertyOrDefault("runtime.java.home", System.getenv('RUNTIME_JAVA_HOME'))
+ if (!runtimeJavaHome) {
+ return currentJvm
+ } else {
+ return registry.installationForDirectory(
+ layout.projectDirectory.dir(runtimeJavaHome)).get()
+ }
+}()
+
+// Set up root project's property.
+rootProject.ext.runtimeJava = altJvm
+rootProject.ext.runtimeJavaVersion = altJvm.javaVersion
+
+if (!currentJvm.javaExecutable.equals(altJvm.javaExecutable)) {
+ // Set up java toolchain tasks to use the alternative Java.
+ // This is a related Gradle issue for the future:
+ // https://github.com/gradle/gradle/issues/1652
+
+ configure(rootProject) {
+ task altJvmWarning() {
+ doFirst {
+ logger.warn("""NOTE: Alternative java toolchain will be used for compilation and tests:
+ Project will use Java ${altJvm.javaVersion} from: ${altJvm.installationDirectory}
+ Gradle runs with Java ${currentJvm.javaVersion} from: ${currentJvm.installationDirectory}
+""")
+ }
+ }
+ }
+
+ // Set up toolchain-dependent tasks to use the alternative JVM.
+ allprojects {
+ // Any tests
+ tasks.withType(Test) {
+ dependsOn ":altJvmWarning"
+ executable = altJvm.javaExecutable
+ }
+
+ // Any javac compilation tasks
+ tasks.withType(JavaCompile) {
+ dependsOn ":altJvmWarning"
+ options.fork = true
+ options.forkOptions.javaHome = altJvm.installationDirectory.asFile
+ }
+
+ // Javadoc compilation.
+ def javadocExecutable = altJvm.jdk.get().javadocExecutable.asFile
+ tasks.matching { it.name == "renderJavadoc" || it.name == "renderSiteJavadoc" }.all {
+ dependsOn ":altJvmWarning"
+ executable = javadocExecutable
+ }
+ }
+}
diff --git a/gradle/wrapper/gradle-wrapper.jar.version b/gradle/wrapper/gradle-wrapper.jar.version
index 2f963cd..021c940 100644
--- a/gradle/wrapper/gradle-wrapper.jar.version
+++ b/gradle/wrapper/gradle-wrapper.jar.version
@@ -1 +1 @@
-7.0.2
\ No newline at end of file
+6.8.3
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 29e4134..8cf6eb5 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists