11import org.jetbrains.changelog.Changelog
2- import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
32
43fun properties (key : String ) = project.findProperty(key).toString()
54
@@ -20,6 +19,11 @@ repositories {
2019 mavenCentral()
2120}
2221
22+ // Set the JVM language level used to build the project.
23+ kotlin {
24+ jvmToolchain(properties(" javaVersion" ).toInt())
25+ }
26+
2327// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
2428intellij {
2529 pluginName.set(properties(" pluginName" ))
@@ -36,22 +40,11 @@ intellij {
3640
3741changelog {
3842// version.set(properties("pluginVersion"))
39- groups.set(emptyList() )
43+ groups.empty( )
4044 repositoryUrl.set(properties(" pluginRepositoryUrl" ))
4145}
4246
4347tasks {
44- // Set the JVM compatibility versions
45- properties(" javaVersion" ).let {
46- withType<JavaCompile > {
47- sourceCompatibility = it
48- targetCompatibility = it
49- }
50- withType<KotlinCompile > {
51- kotlinOptions.jvmTarget = it
52- }
53- }
54-
5548 wrapper {
5649 gradleVersion = properties(" gradleVersion" )
5750 }
@@ -83,24 +76,7 @@ tasks {
8376 publishPlugin {
8477 dependsOn(" patchChangelog" )
8578 token.set(System .getenv(" PUBLISH_TOKEN" ))
86- channels.set(listOf (properties(" pluginVersion" ).split(' -' ).getOrElse(1 ) { " default" }.split(' .' ).first()))
87- }
88-
89- buildPlugin {
90- exclude { " coroutines" in it.name }
9179 }
92-
93- buildSearchableOptions {
94- enabled = false
95- }
96-
97- prepareSandbox {
98- exclude { " coroutines" in it.name }
99- }
100- }
101-
102- tasks.withType<KotlinCompile >().configureEach {
103- kotlinOptions.freeCompilerArgs + = " -opt-in=kotlin.RequiresOptIn"
10480}
10581
10682tasks.test {
0 commit comments