From d2c676e7a3367209e243aca77e8440488820ea5b Mon Sep 17 00:00:00 2001 From: Michael Plump Date: Fri, 3 Oct 2025 11:20:32 -0700 Subject: [PATCH] Update the IntelliJ plugin to gjf 1.29.0. Since this requires Java 21, set the minimum supported version to 2024.3 (which ships with Java 21). PiperOrigin-RevId: 814763806 --- idea_plugin/build.gradle.kts | 56 ++++++++----------- .../src/main/resources/META-INF/plugin.xml | 3 + 2 files changed, 27 insertions(+), 32 deletions(-) diff --git a/idea_plugin/build.gradle.kts b/idea_plugin/build.gradle.kts index 459582e42..1710154f4 100644 --- a/idea_plugin/build.gradle.kts +++ b/idea_plugin/build.gradle.kts @@ -17,24 +17,20 @@ import org.jetbrains.intellij.platform.gradle.TestFrameworkType // https://github.com/JetBrains/intellij-platform-gradle-plugin/releases -plugins { - id("org.jetbrains.intellij.platform") version "2.6.0" -} +plugins { id("org.jetbrains.intellij.platform") version "2.9.0" } repositories { mavenCentral() - intellijPlatform { - defaultRepositories() - } + intellijPlatform { defaultRepositories() } } // https://github.com/google/google-java-format/releases -val googleJavaFormatVersion = "1.28.0" +val googleJavaFormatVersion = "1.29.0" java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } intellijPlatform { @@ -42,7 +38,7 @@ intellijPlatform { name = "google-java-format" version = "${googleJavaFormatVersion}.0" ideaVersion { - sinceBuild = "223" + sinceBuild = "243" untilBuild = provider { null } } } @@ -54,32 +50,28 @@ intellijPlatform { } var gjfRequiredJvmArgs = - listOf( - "--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", - "--add-exports", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - "--add-exports", "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", - "--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - ) + listOf( + "--add-exports", + "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", + "--add-exports", + "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", + "--add-exports", + "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", + "--add-exports", + "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", + "--add-exports", + "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", + "--add-exports", + "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", + ) -tasks { - runIde { - jvmArgumentProviders += CommandLineArgumentProvider { - gjfRequiredJvmArgs - } - } -} +tasks { runIde { jvmArgumentProviders += CommandLineArgumentProvider { gjfRequiredJvmArgs } } } -tasks { - withType().configureEach { - jvmArgs(gjfRequiredJvmArgs) - } -} +tasks { withType().configureEach { jvmArgs(gjfRequiredJvmArgs) } } dependencies { intellijPlatform { - intellijIdeaCommunity("2022.3") + intellijIdeaCommunity("2024.3") bundledPlugin("com.intellij.java") testFramework(TestFrameworkType.Plugin.Java) } @@ -87,5 +79,5 @@ dependencies { // https://mvnrepository.com/artifact/junit/junit testImplementation("junit:junit:4.13.2") // https://mvnrepository.com/artifact/com.google.truth/truth - testImplementation("com.google.truth:truth:1.4.4") + testImplementation("com.google.truth:truth:1.4.5") } diff --git a/idea_plugin/src/main/resources/META-INF/plugin.xml b/idea_plugin/src/main/resources/META-INF/plugin.xml index 2575a6cf4..3ddb285a6 100644 --- a/idea_plugin/src/main/resources/META-INF/plugin.xml +++ b/idea_plugin/src/main/resources/META-INF/plugin.xml @@ -35,6 +35,9 @@ ]]> +
1.29.0.0
+
Updated to use google-java-format 1.29.0.
+
Minimum supported IntelliJ version is now 2024.3.
1.28.0.0
Updated to use google-java-format 1.28.0.
1.27.0.0