Skip to content

Commit

Permalink
Update IntelliJ plugin to 1.23.0.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 665921070
  • Loading branch information
plumpy authored and google-java-format Team committed Aug 21, 2024
1 parent 0ebb588 commit 5544952
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
35 changes: 23 additions & 12 deletions idea_plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repositories {
}

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

java {
sourceCompatibility = JavaVersion.VERSION_17
Expand All @@ -42,25 +42,36 @@ intellijPlatform {
version = "${googleJavaFormatVersion}.0"
ideaVersion {
sinceBuild = "223"
untilBuild = ""
}
}

publishing {
token = System.getenv("ORG_GRADLE_PROJECT_intellijPlatform.publishing.token")
val jetbrainsPluginRepoToken: String by project
token.set(jetbrainsPluginRepoToken)
}
}

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",
)

tasks {
runIde {
jvmArgumentProviders += CommandLineArgumentProvider {
gjfRequiredJvmArgs
}
}
}

tasks {
withType<Test>().configureEach {
jvmArgs(
"--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",
)
jvmArgs(gjfRequiredJvmArgs)
}
}

Expand All @@ -75,5 +86,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.2")
testImplementation("com.google.truth:truth:1.4.4")
}
4 changes: 4 additions & 0 deletions idea_plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
]]></description>
<change-notes><![CDATA[
<dl>
<dt>1.23.0.0</dt>
<dd>Updated to use google-java-format 1.23.0.</dd>
<dd>Fix crashes in IntelliJ 2024.2 (Thanks, <code>@nrayburn-tech</code>!)</dd>
<dd>Updated to the latest IntelliJ build system (Thanks, <code>@mmaeller</code>!)</dd>
<dt>1.22.0.0</dt>
<dd>Updated to use google-java-format 1.22.0.</dd>
<dt>1.21.0.0</dt>
Expand Down

0 comments on commit 5544952

Please sign in to comment.