@@ -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
3434java {
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
5472tasks {
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}
0 commit comments