Add OpenJDK 20.0.1

Content of README.google:

Name: Java Development Kit (JDK)
URL: https://jdk.java.net/20/
Version: 20
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.

Bug: b/281902832
Change-Id: I5d4b3171e57ac0d16ba786a7156910947b5ab7be
diff --git a/build.gradle b/build.gradle
index 6a788a9..5df3bb4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -140,9 +140,9 @@
             srcDirs = ['src/test/examplesJava17']
         }
     }
-    examplesJava18 {
+    examplesJava20 {
         java {
-            srcDirs = ['src/test/examplesJava18']
+            srcDirs = ['src/test/examplesJava20']
         }
     }
     examplesTestNGRunner {
@@ -402,20 +402,20 @@
                                 "openjdk/jdk8/linux-x86",
                                 "openjdk/jdk-11/linux",
                                 "openjdk/jdk-17/linux",
-                                "openjdk/jdk-18/linux"],
+                                "openjdk/jdk-20/linux"],
         ],
         osx: [
                 "third_party": ["openjdk/openjdk-9.0.4/osx",
                                 "openjdk/jdk8/darwin-x86",
                                 "openjdk/jdk-11/osx",
                                 "openjdk/jdk-17/osx",
-                                "openjdk/jdk-18/osx"],
+                                "openjdk/jdk-20/osx"],
         ],
         windows: [
                 "third_party": ["openjdk/openjdk-9.0.4/windows",
                                 "openjdk/jdk-11/windows",
                                 "openjdk/jdk-17/windows",
-                                "openjdk/jdk-18/windows"],
+                                "openjdk/jdk-20/windows"],
         ],
 ]
 
@@ -639,8 +639,8 @@
         JavaVersion.VERSION_17,
         false)
 setJdkCompilationWithCompatibility(
-        sourceSets.examplesJava18.compileJavaTaskName,
-        'jdk-18',
+        sourceSets.examplesJava20.compileJavaTaskName,
+        'jdk-20',
         // TODO(b/218293990): Update Gradle to get JavaVersion.VERSION_18.
         JavaVersion.VERSION_17,
         false)
@@ -1562,7 +1562,7 @@
 buildExampleJarsCreateTask("Java10", sourceSets.examplesJava10)
 buildExampleJarsCreateTask("Java11", sourceSets.examplesJava11)
 buildExampleJarsCreateTask("Java17", sourceSets.examplesJava17)
-buildExampleJarsCreateTask("Java18", sourceSets.examplesJava18)
+buildExampleJarsCreateTask("Java20", sourceSets.examplesJava20)
 
 task provideArtFrameworksDependencies {
     cloudDependencies.tools.forEach({ art ->
@@ -1624,7 +1624,7 @@
     dependsOn buildExampleJava10Jars
     dependsOn buildExampleJava11Jars
     dependsOn buildExampleJava17Jars
-    dependsOn buildExampleJava18Jars
+    dependsOn buildExampleJava20Jars
     dependsOn buildExampleAndroidApi
     def examplesDir = file("src/test/examples")
     examplesDir.eachDir { dir ->
diff --git a/scripts/add-openjdk.sh b/scripts/add-openjdk.sh
index e8714f3..4aac626 100755
--- a/scripts/add-openjdk.sh
+++ b/scripts/add-openjdk.sh
@@ -18,7 +18,7 @@
 
 # Now run script with fingers crossed!
 
-JDK_VERSION="18"
+JDK_VERSION="20.0.1"
 JDK_VERSION_FULL=${JDK_VERSION}
 # For ea versions the full version name has a postfix.
 # JDK_VERSION_FULL="${JDK_VERSION}-ea+33"
diff --git a/src/test/examplesJava18/jdk8272564/A.java b/src/test/examplesJava20/jdk8272564/A.java
similarity index 100%
rename from src/test/examplesJava18/jdk8272564/A.java
rename to src/test/examplesJava20/jdk8272564/A.java
diff --git a/src/test/examplesJava18/jdk8272564/B.java b/src/test/examplesJava20/jdk8272564/B.java
similarity index 100%
rename from src/test/examplesJava18/jdk8272564/B.java
rename to src/test/examplesJava20/jdk8272564/B.java
diff --git a/src/test/examplesJava18/jdk8272564/C.java b/src/test/examplesJava20/jdk8272564/C.java
similarity index 100%
rename from src/test/examplesJava18/jdk8272564/C.java
rename to src/test/examplesJava20/jdk8272564/C.java
diff --git a/src/test/examplesJava18/jdk8272564/I.java b/src/test/examplesJava20/jdk8272564/I.java
similarity index 100%
rename from src/test/examplesJava18/jdk8272564/I.java
rename to src/test/examplesJava20/jdk8272564/I.java
diff --git a/src/test/examplesJava18/jdk8272564/J.java b/src/test/examplesJava20/jdk8272564/J.java
similarity index 100%
rename from src/test/examplesJava18/jdk8272564/J.java
rename to src/test/examplesJava20/jdk8272564/J.java
diff --git a/src/test/examplesJava18/jdk8272564/K.java b/src/test/examplesJava20/jdk8272564/K.java
similarity index 100%
rename from src/test/examplesJava18/jdk8272564/K.java
rename to src/test/examplesJava20/jdk8272564/K.java
diff --git a/src/test/examplesJava18/jdk8272564/Main.java b/src/test/examplesJava20/jdk8272564/Main.java
similarity index 100%
rename from src/test/examplesJava18/jdk8272564/Main.java
rename to src/test/examplesJava20/jdk8272564/Main.java
diff --git a/src/test/java/com/android/tools/r8/TestRuntime.java b/src/test/java/com/android/tools/r8/TestRuntime.java
index 0d937dd..4f95deb 100644
--- a/src/test/java/com/android/tools/r8/TestRuntime.java
+++ b/src/test/java/com/android/tools/r8/TestRuntime.java
@@ -41,6 +41,7 @@
     JDK16("jdk16", 60),
     JDK17("jdk17", 61),
     JDK18("jdk18", 62),
+    JDK20("jdk20", 64),
     ;
 
     /** This should generally be the latest checked in CF runtime we fully support. */
diff --git a/src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564Test.java b/src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564Test.java
index bb58476..c7d877e 100644
--- a/src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564Test.java
+++ b/src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564Test.java
@@ -27,8 +27,8 @@
 
   @Parameters(name = "{0}")
   public static TestParametersCollection data() {
-    // TODO(b/218293990): Right now the JDK 18 tests are built with -target 17, as our Gradle
-    //  version does not know of -target 18.
+    // TODO(b/218293990): Right now the JDK 20 tests are built with -target 17, as our Gradle
+    //  version does not know of -target 20.
     return getTestParameters()
         .withCfRuntimesStartingFromIncluding(CfVm.JDK17)
         .withDexRuntimes()
diff --git a/src/test/java/com/android/tools/r8/examples/jdk18/jdk8272564/Jdk8272564.java b/src/test/java/com/android/tools/r8/examples/jdk18/jdk8272564/Jdk8272564.java
index 5e891aa..5497f91 100644
--- a/src/test/java/com/android/tools/r8/examples/jdk18/jdk8272564/Jdk8272564.java
+++ b/src/test/java/com/android/tools/r8/examples/jdk18/jdk8272564/Jdk8272564.java
@@ -9,7 +9,7 @@
 
 public class Jdk8272564 {
 
-  private static final String EXAMPLE_FILE = "examplesJava18/jdk8272564";
+  private static final String EXAMPLE_FILE = "examplesJava20/jdk8272564";
 
   public static final JavaExampleClassProxy A =
       new JavaExampleClassProxy(EXAMPLE_FILE, "jdk8272564/A");
diff --git a/third_party/openjdk/jdk-20/linux.tar.gz.sha1 b/third_party/openjdk/jdk-20/linux.tar.gz.sha1
new file mode 100644
index 0000000..33f7ffa
--- /dev/null
+++ b/third_party/openjdk/jdk-20/linux.tar.gz.sha1
@@ -0,0 +1 @@
+d901c9848cf777b26b57b408fc7f6f28d8d2c5b6
\ No newline at end of file
diff --git a/third_party/openjdk/jdk-20/osx.tar.gz.sha1 b/third_party/openjdk/jdk-20/osx.tar.gz.sha1
new file mode 100644
index 0000000..51f35d1
--- /dev/null
+++ b/third_party/openjdk/jdk-20/osx.tar.gz.sha1
@@ -0,0 +1 @@
+fdee9da4ef8d01071e533858d1c76b0f0c09c362
\ No newline at end of file
diff --git a/third_party/openjdk/jdk-20/windows.tar.gz.sha1 b/third_party/openjdk/jdk-20/windows.tar.gz.sha1
new file mode 100644
index 0000000..f377055
--- /dev/null
+++ b/third_party/openjdk/jdk-20/windows.tar.gz.sha1
@@ -0,0 +1 @@
+7b602bec8421d42a22c5cab6e1f34f288c38b8da
\ No newline at end of file
diff --git a/tools/test.py b/tools/test.py
index 2f0254c..a8e279f 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -59,6 +59,7 @@
   'jdk9',
   'jdk11',
   'jdk17',
+  'jdk20',
 ] + [ 'dex-%s' % dexvm for dexvm in ALL_ART_VMS ]
 
 def ParseOptions():