mirror of https://github.com/apache/lucene.git
Revert "Adding initial patch by Gautam Worah" (restore pristine main)
This reverts commit 067ab4f503aabea59639e692e3ea9ee30750c68e.
This commit is contained in:
parent
bac22d6116
commit
523cea2c5d
|
@ -16,15 +16,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Configure Java project defaults.
|
// 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 {
|
allprojects {
|
||||||
plugins.withType(JavaPlugin) {
|
plugins.withType(JavaPlugin) {
|
||||||
|
|
|
@ -18,60 +18,60 @@
|
||||||
// This adds support for compiling and testing against a different Java runtime.
|
// 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.
|
// This is the only way to build against JVMs not yet supported by Gradle itself.
|
||||||
|
|
||||||
//JavaInstallationRegistry registry = extensions.getByType(JavaInstallationRegistry)
|
JavaInstallationRegistry registry = extensions.getByType(JavaInstallationRegistry)
|
||||||
//
|
|
||||||
//JavaInstallation currentJvm = registry.installationForCurrentVirtualMachine.get()
|
JavaInstallation currentJvm = registry.installationForCurrentVirtualMachine.get()
|
||||||
//
|
|
||||||
//JavaInstallation altJvm = {
|
JavaInstallation altJvm = {
|
||||||
// def runtimeJavaHome = propertyOrDefault("runtime.java.home", System.getenv('RUNTIME_JAVA_HOME'))
|
def runtimeJavaHome = propertyOrDefault("runtime.java.home", System.getenv('RUNTIME_JAVA_HOME'))
|
||||||
// if (!runtimeJavaHome) {
|
if (!runtimeJavaHome) {
|
||||||
// return currentJvm
|
return currentJvm
|
||||||
// } else {
|
} else {
|
||||||
// return registry.installationForDirectory(
|
return registry.installationForDirectory(
|
||||||
// layout.projectDirectory.dir(runtimeJavaHome)).get()
|
layout.projectDirectory.dir(runtimeJavaHome)).get()
|
||||||
// }
|
}
|
||||||
//}()
|
}()
|
||||||
//
|
|
||||||
//// Set up root project's property.
|
// Set up root project's property.
|
||||||
//rootProject.ext.runtimeJava = altJvm
|
rootProject.ext.runtimeJava = altJvm
|
||||||
rootProject.ext.runtimeJavaVersion = JavaVersion.VERSION_11
|
rootProject.ext.runtimeJavaVersion = altJvm.javaVersion
|
||||||
//
|
|
||||||
//if (!currentJvm.javaExecutable.equals(altJvm.javaExecutable)) {
|
if (!currentJvm.javaExecutable.equals(altJvm.javaExecutable)) {
|
||||||
// // Set up java toolchain tasks to use the alternative Java.
|
// Set up java toolchain tasks to use the alternative Java.
|
||||||
// // This is a related Gradle issue for the future:
|
// This is a related Gradle issue for the future:
|
||||||
// // https://github.com/gradle/gradle/issues/1652
|
// https://github.com/gradle/gradle/issues/1652
|
||||||
//
|
|
||||||
// configure(rootProject) {
|
configure(rootProject) {
|
||||||
// task altJvmWarning() {
|
task altJvmWarning() {
|
||||||
// doFirst {
|
doFirst {
|
||||||
// logger.warn("""NOTE: Alternative java toolchain will be used for compilation and tests:
|
logger.warn("""NOTE: Alternative java toolchain will be used for compilation and tests:
|
||||||
// Project will use Java ${altJvm.javaVersion} from: ${altJvm.installationDirectory}
|
Project will use Java ${altJvm.javaVersion} from: ${altJvm.installationDirectory}
|
||||||
// Gradle runs with Java ${currentJvm.javaVersion} from: ${currentJvm.installationDirectory}
|
Gradle runs with Java ${currentJvm.javaVersion} from: ${currentJvm.installationDirectory}
|
||||||
//""")
|
""")
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// // Set up toolchain-dependent tasks to use the alternative JVM.
|
// Set up toolchain-dependent tasks to use the alternative JVM.
|
||||||
// allprojects {
|
allprojects {
|
||||||
// // Any tests
|
// Any tests
|
||||||
// tasks.withType(Test) {
|
tasks.withType(Test) {
|
||||||
// dependsOn ":altJvmWarning"
|
dependsOn ":altJvmWarning"
|
||||||
// executable = altJvm.javaExecutable
|
executable = altJvm.javaExecutable
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// // Any javac compilation tasks
|
// Any javac compilation tasks
|
||||||
// tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
// dependsOn ":altJvmWarning"
|
dependsOn ":altJvmWarning"
|
||||||
// options.fork = true
|
options.fork = true
|
||||||
// options.forkOptions.javaHome = altJvm.installationDirectory.asFile
|
options.forkOptions.javaHome = altJvm.installationDirectory.asFile
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// // Javadoc compilation.
|
// Javadoc compilation.
|
||||||
// def javadocExecutable = altJvm.jdk.get().javadocExecutable.asFile
|
def javadocExecutable = altJvm.jdk.get().javadocExecutable.asFile
|
||||||
// tasks.matching { it.name == "renderJavadoc" || it.name == "renderSiteJavadoc" }.all {
|
tasks.matching { it.name == "renderJavadoc" || it.name == "renderSiteJavadoc" }.all {
|
||||||
// dependsOn ":altJvmWarning"
|
dependsOn ":altJvmWarning"
|
||||||
// executable = javadocExecutable
|
executable = javadocExecutable
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
7.0.2
|
6.8.3
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
Loading…
Reference in New Issue