11import org.jetbrains.changelog.Changelog
2+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3+ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
24
35val dartVersion: String by project
46val sinceBuildVersion: String by project
@@ -9,15 +11,14 @@ val pluginVersion: String by project
911val type: String by project
1012
1113plugins {
12- id(" org.jetbrains.kotlin.jvm" ) version " 1.9.20 "
14+ id(" org.jetbrains.kotlin.jvm" ) version " 2.0.0 "
1315 id(" org.jetbrains.intellij" ) version " 1.16.1"
1416 idea
1517 id(" org.jetbrains.changelog" ) version " 2.2.0"
1618}
1719group = " shop.itbug"
1820version = pluginVersion + type
1921
20- println (project.version)
2122repositories {
2223 mavenLocal()
2324 mavenCentral()
@@ -60,8 +61,6 @@ dependencies {
6061}
6162
6263val pushToken: String? = System .getenv(" idea_push_token" )
63- var javaVersion = " 17"
64-
6564
6665tasks {
6766
@@ -75,11 +74,10 @@ tasks {
7574 )
7675 }
7776 withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > ().configureEach {
78- kotlinOptions.jvmTarget = javaVersion
79- kotlinOptions.freeCompilerArgs + = " -opt-in=kotlin.RequiresOptIn"
80- compilerOptions.languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion .KOTLIN_1_9 )
8177 compilerOptions {
82-
78+ languageVersion.set(KotlinVersion .KOTLIN_2_0 )
79+ jvmTarget.set(JvmTarget .JVM_17 )
80+ freeCompilerArgs.add(" -opt-in=kotlin.RequiresOptIn" )
8381 }
8482 }
8583
@@ -113,23 +111,19 @@ tasks {
113111 }
114112
115113 compileKotlin {
116- kotlinOptions.jvmTarget = javaVersion
117- }
118-
119- compileTestKotlin {
120- kotlinOptions.jvmTarget = javaVersion
114+ compilerOptions {
115+ jvmTarget.set(JvmTarget .JVM_17 )
116+ }
121117 }
122118
123119 test {
124120 useJUnitPlatform()
125121 }
126122
127123 configurations.all {
128-
129124 }
130125
131126 verifyPlugin {
132-
133127 }
134128
135129 verifyPluginConfiguration {
0 commit comments