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 2025/05/01 06:59:18 UTC
(lucene) branch main updated: An attempt to make jenkins pass with the currently installed jdk24-ea. To be reverted later. #14600
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
The following commit(s) were added to refs/heads/main by this push:
new 6a25349c6ac An attempt to make jenkins pass with the currently installed jdk24-ea. To be reverted later. #14600
6a25349c6ac is described below
commit 6a25349c6acb6a3a3f7191aade730233e368cff8
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Thu May 1 08:59:04 2025 +0200
An attempt to make jenkins pass with the currently installed jdk24-ea. To be reverted later. #14600
---
gradle/java/javac.gradle | 10 ++++++++++
gradle/testing/alternative-jdk-support.gradle | 3 ++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/gradle/java/javac.gradle b/gradle/java/javac.gradle
index 537769ea191..66b0bd89d54 100644
--- a/gradle/java/javac.gradle
+++ b/gradle/java/javac.gradle
@@ -1,3 +1,5 @@
+import org.gradle.internal.jvm.inspection.JvmInstallationMetadata
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -27,6 +29,14 @@ allprojects { project ->
options.compilerArgs += ["--release", rootProject.minJavaVersion.toString()]
}
+ // TODO: temporary hack to enable builds to pass. https://github.com/apache/lucene/issues/14600
+ JvmInstallationMetadata ver = rootProject.ext.runtimeJavaMetadata
+ if (project.path == ":lucene:expressions" && ver.runtimeVersion.matches("24(.+)-ea")) {
+ tasks.withType(JavaCompile) {
+ options.compilerArgs += ["--enable-preview"]
+ }
+ }
+
// Configure warnings.
// Use 'javac --help-lint' to get the supported list
tasks.withType(JavaCompile) {
diff --git a/gradle/testing/alternative-jdk-support.gradle b/gradle/testing/alternative-jdk-support.gradle
index 4b421e1decf..fda9457f478 100644
--- a/gradle/testing/alternative-jdk-support.gradle
+++ b/gradle/testing/alternative-jdk-support.gradle
@@ -88,6 +88,7 @@ if (jvmGradle != jvmCurrent) {
// Set up root project's properties.
rootProject.ext.runtimeJavaExecutable = jvmCurrent.javaExecutable
rootProject.ext.runtimeJavaHome = jvmCurrent.javaHome
-rootProject.ext.runtimeJavaVersion = jvmDetector.getMetadata(InstallationLocation.userDefined(jvmCurrent.javaHome, "specific path")).getLanguageVersion()
+rootProject.ext.runtimeJavaMetadata = jvmDetector.getMetadata(InstallationLocation.userDefined(jvmCurrent.javaHome, "specific path"))
+rootProject.ext.runtimeJavaVersion = runtimeJavaMetadata.getLanguageVersion()
rootProject.ext.usesAltJvm = (jvmGradle != jvmCurrent);