Skip to content

Commit 5544952

Browse files
plumpygoogle-java-format Team
authored andcommitted
Update IntelliJ plugin to 1.23.0.
PiperOrigin-RevId: 665921070
1 parent 0ebb588 commit 5544952

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

idea_plugin/build.gradle.kts

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repositories {
2929
}
3030

3131
// https://github.com/google/google-java-format/releases
32-
val googleJavaFormatVersion = "1.22.0"
32+
val googleJavaFormatVersion = "1.23.0"
3333

3434
java {
3535
sourceCompatibility = JavaVersion.VERSION_17
@@ -42,25 +42,36 @@ intellijPlatform {
4242
version = "${googleJavaFormatVersion}.0"
4343
ideaVersion {
4444
sinceBuild = "223"
45-
untilBuild = ""
4645
}
4746
}
4847

4948
publishing {
50-
token = System.getenv("ORG_GRADLE_PROJECT_intellijPlatform.publishing.token")
49+
val jetbrainsPluginRepoToken: String by project
50+
token.set(jetbrainsPluginRepoToken)
51+
}
52+
}
53+
54+
var gjfRequiredJvmArgs =
55+
listOf(
56+
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
57+
"--add-exports", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
58+
"--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
59+
"--add-exports", "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
60+
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
61+
"--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
62+
)
63+
64+
tasks {
65+
runIde {
66+
jvmArgumentProviders += CommandLineArgumentProvider {
67+
gjfRequiredJvmArgs
68+
}
5169
}
5270
}
5371

5472
tasks {
5573
withType<Test>().configureEach {
56-
jvmArgs(
57-
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
58-
"--add-exports", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
59-
"--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
60-
"--add-exports", "jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
61-
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
62-
"--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
63-
)
74+
jvmArgs(gjfRequiredJvmArgs)
6475
}
6576
}
6677

@@ -75,5 +86,5 @@ dependencies {
7586
// https://mvnrepository.com/artifact/junit/junit
7687
testImplementation("junit:junit:4.13.2")
7788
// https://mvnrepository.com/artifact/com.google.truth/truth
78-
testImplementation("com.google.truth:truth:1.4.2")
89+
testImplementation("com.google.truth:truth:1.4.4")
7990
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
]]></description>
3636
<change-notes><![CDATA[
3737
<dl>
38+
<dt>1.23.0.0</dt>
39+
<dd>Updated to use google-java-format 1.23.0.</dd>
40+
<dd>Fix crashes in IntelliJ 2024.2 (Thanks, <code>@nrayburn-tech</code>!)</dd>
41+
<dd>Updated to the latest IntelliJ build system (Thanks, <code>@mmaeller</code>!)</dd>
3842
<dt>1.22.0.0</dt>
3943
<dd>Updated to use google-java-format 1.22.0.</dd>
4044
<dt>1.21.0.0</dt>

0 commit comments

Comments
 (0)