From b7979e05449103f4dd26c6b59d94c2ee8372a011 Mon Sep 17 00:00:00 2001 From: Lai Jiang Date: Thu, 14 Mar 2024 14:32:19 -0400 Subject: [PATCH] Compile to Java 21 bytecode We have been running in Java 21 runtime for a couple of weeks and every works as expected. --- build.gradle | 4 ++-- .../main/java/google/registry/processors/VKeyProcessor.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index b36e31418f..e0af16793d 100644 --- a/build.gradle +++ b/build.gradle @@ -342,8 +342,8 @@ subprojects { // search for `flex-template-base-image` and update the parameter value. // There are at least two instances, one in core/build.gradle, one in // release/stage_beam_pipeline.sh - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 project.tasks.test.dependsOn runPresubmits diff --git a/processor/src/main/java/google/registry/processors/VKeyProcessor.java b/processor/src/main/java/google/registry/processors/VKeyProcessor.java index d49ee38849..574eb568a7 100644 --- a/processor/src/main/java/google/registry/processors/VKeyProcessor.java +++ b/processor/src/main/java/google/registry/processors/VKeyProcessor.java @@ -50,7 +50,7 @@ /** Processor to generate {@link AttributeConverter} for {@code VKey} type. */ @SupportedAnnotationTypes("google.registry.persistence.WithVKey") -@SupportedSourceVersion(SourceVersion.RELEASE_17) +@SupportedSourceVersion(SourceVersion.RELEASE_21) public class VKeyProcessor extends AbstractProcessor { private static final String CONVERTER_CLASS_NAME_TEMP = "VKeyConverter_%s";