Add OpenJDK 21 GA build
Replace all usage of OpenJdk 20 with this.
Content of README.google:
Name: Java Development Kit (JDK)
URL: https://jdk.java.net/21/
Version: 21
Revision: NA
License: the GNU General Public License, version 2, with the Classpath Exception.
Description:
This is pulled directly from the website for the JDK releases that has an open source license.
Synlinks have reen resolved using `cp -rL` before uploading.
Change-Id: I4ab925c7de826d3c3dc802c8fb40ab60873b0883
Bug: b/293630962
diff --git a/d8_r8/test_modules/tests_java_21/build.gradle.kts b/d8_r8/test_modules/tests_java_21/build.gradle.kts
new file mode 100644
index 0000000..9d71db8
--- /dev/null
+++ b/d8_r8/test_modules/tests_java_21/build.gradle.kts
@@ -0,0 +1,37 @@
+// Copyright (c) 2023, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import org.gradle.api.JavaVersion
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
+
+plugins {
+ `kotlin-dsl`
+ `java-library`
+ id("dependencies-plugin")
+}
+
+val root = getRoot()
+
+java {
+ sourceSets.test.configure {
+ java.srcDir(root.resolveAll("src", "test", "examplesJava21"))
+ }
+ sourceCompatibility = JavaVersion.VERSION_21
+ targetCompatibility = JavaVersion.VERSION_21
+}
+
+dependencies { }
+
+// We just need to register the examples jars for it to be referenced by other modules.
+val buildExampleJars = buildExampleJars("examplesJava21")
+
+tasks {
+ withType<JavaCompile> {
+ dependsOn(gradle.includedBuild("shared").task(":downloadDeps"))
+ options.setFork(true)
+ options.forkOptions.memoryMaximumSize = "3g"
+ options.forkOptions.executable = getCompilerPath(Jdk.JDK_21)
+ }
+}
+