LUCENE-9448, LUCENE-9990: fix Luke's launcher task.

This commit is contained in:
Dawid Weiss 2021-09-16 08:49:26 +02:00
parent b7a286dd69
commit de45b68c90
2 changed files with 2 additions and 6 deletions

View File

@ -85,5 +85,6 @@ if (jvmGradle != jvmCurrent) {
}
// Set up root project's properties.
rootProject.ext.runtimeJavaExecutable = jvmCurrent.javaExecutable
rootProject.ext.runtimeJavaHome = jvmCurrent.javaHome
rootProject.ext.runtimeJavaVersion = jvmDetector.getMetadata(jvmCurrent.javaHome).languageVersion

View File

@ -133,13 +133,8 @@ task run() {
doFirst {
logger.lifecycle("Launching Luke ${project.version} right now...")
def javaExecutable = {
def registry = project.extensions.getByType(JavaInstallationRegistry)
def currentJvm = registry.installationForCurrentVirtualMachine.get()
currentJvm.getJavaExecutable().asFile
}()
ant.exec(
executable: javaExecutable,
executable: rootProject.ext.runtimeJavaExecutable,
spawn: true,
vmlauncher: true
) {