Skip to content

Commit d2c676e

Browse files
plumpygoogle-java-format Team
authored andcommitted
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
1 parent c270951 commit d2c676e

File tree

2 files changed

+27
-32
lines changed

2 files changed

+27
-32
lines changed

idea_plugin/build.gradle.kts

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,28 @@
1717
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
1818

1919
// https://github.com/JetBrains/intellij-platform-gradle-plugin/releases
20-
plugins {
21-
id("org.jetbrains.intellij.platform") version "2.6.0"
22-
}
20+
plugins { id("org.jetbrains.intellij.platform") version "2.9.0" }
2321

2422
repositories {
2523
mavenCentral()
2624

27-
intellijPlatform {
28-
defaultRepositories()
29-
}
25+
intellijPlatform { defaultRepositories() }
3026
}
3127

3228
// https://github.com/google/google-java-format/releases
33-
val googleJavaFormatVersion = "1.28.0"
29+
val googleJavaFormatVersion = "1.29.0"
3430

3531
java {
36-
sourceCompatibility = JavaVersion.VERSION_17
37-
targetCompatibility = JavaVersion.VERSION_17
32+
sourceCompatibility = JavaVersion.VERSION_21
33+
targetCompatibility = JavaVersion.VERSION_21
3834
}
3935

4036
intellijPlatform {
4137
pluginConfiguration {
4238
name = "google-java-format"
4339
version = "${googleJavaFormatVersion}.0"
4440
ideaVersion {
45-
sinceBuild = "223"
41+
sinceBuild = "243"
4642
untilBuild = provider { null }
4743
}
4844
}
@@ -54,38 +50,34 @@ intellijPlatform {
5450
}
5551

5652
var gjfRequiredJvmArgs =
57-
listOf(
58-
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
59-
"--add-exports", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
60-
"--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
61-
"--add-exports", "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
62-
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
63-
"--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
64-
)
53+
listOf(
54+
"--add-exports",
55+
"jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
56+
"--add-exports",
57+
"jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
58+
"--add-exports",
59+
"jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
60+
"--add-exports",
61+
"jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
62+
"--add-exports",
63+
"jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
64+
"--add-exports",
65+
"jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
66+
)
6567

66-
tasks {
67-
runIde {
68-
jvmArgumentProviders += CommandLineArgumentProvider {
69-
gjfRequiredJvmArgs
70-
}
71-
}
72-
}
68+
tasks { runIde { jvmArgumentProviders += CommandLineArgumentProvider { gjfRequiredJvmArgs } } }
7369

74-
tasks {
75-
withType<Test>().configureEach {
76-
jvmArgs(gjfRequiredJvmArgs)
77-
}
78-
}
70+
tasks { withType<Test>().configureEach { jvmArgs(gjfRequiredJvmArgs) } }
7971

8072
dependencies {
8173
intellijPlatform {
82-
intellijIdeaCommunity("2022.3")
74+
intellijIdeaCommunity("2024.3")
8375
bundledPlugin("com.intellij.java")
8476
testFramework(TestFrameworkType.Plugin.Java)
8577
}
8678
implementation("com.google.googlejavaformat:google-java-format:${googleJavaFormatVersion}")
8779
// https://mvnrepository.com/artifact/junit/junit
8880
testImplementation("junit:junit:4.13.2")
8981
// https://mvnrepository.com/artifact/com.google.truth/truth
90-
testImplementation("com.google.truth:truth:1.4.4")
82+
testImplementation("com.google.truth:truth:1.4.5")
9183
}

idea_plugin/src/main/resources/META-INF/plugin.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
]]></description>
3636
<change-notes><![CDATA[
3737
<dl>
38+
<dt>1.29.0.0</dt>
39+
<dd>Updated to use google-java-format 1.29.0.</dd>
40+
<dd>Minimum supported IntelliJ version is now 2024.3.</dd>
3841
<dt>1.28.0.0</dt>
3942
<dd>Updated to use google-java-format 1.28.0.</dd>
4043
<dt>1.27.0.0</dt>

0 commit comments

Comments
 (0)