From 90880fc10faaf5212d905b2280d34c4532f03e74 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 9 Jun 2022 19:38:15 +0300 Subject: [PATCH] To Kotlin 1.7.0 --- build.gradle.kts | 1 + gradle/libs.versions.toml | 4 ++-- src/main/kotlin/ru/mipt/npm/gradle/KScienceCommonPlugin.kt | 2 +- src/main/kotlin/ru/mipt/npm/gradle/commonConfigurations.kt | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 61dc866..389ecc3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ plugins { alias(libs.plugins.changelog) alias(libs.plugins.dokka) + alias(libs.plugins.kotlin.jvm) `java-gradle-plugin` `kotlin-dsl` `maven-publish` diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e457841..d86cbad 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -tools = "0.11.5-kotlin-1.6.21" -kotlin = "1.6.21" +tools = "0.11.5-kotlin-1.7.0" +kotlin = "1.7.0" atomicfu = "0.17.2" binary-compatibility-validator = "0.9.0" changelog = "1.3.1" diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceCommonPlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceCommonPlugin.kt index 5eaf4d5..0db1539 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceCommonPlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceCommonPlugin.kt @@ -5,6 +5,6 @@ import org.gradle.api.Project public open class KScienceCommonPlugin : Plugin { override fun apply(project: Project): Unit = project.configureKScience( - KotlinVersion(1, 6, 21) + KotlinVersion(1, 7, 0) ) } diff --git a/src/main/kotlin/ru/mipt/npm/gradle/commonConfigurations.kt b/src/main/kotlin/ru/mipt/npm/gradle/commonConfigurations.kt index 4492542..b94d86d 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/commonConfigurations.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/commonConfigurations.kt @@ -7,9 +7,9 @@ import org.gradle.api.tasks.testing.Test import org.gradle.kotlin.dsl.* import org.jetbrains.dokka.gradle.DokkaPlugin import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension -import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompile import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import ru.mipt.npm.gradle.internal.applyRepos import ru.mipt.npm.gradle.internal.applySettings import ru.mipt.npm.gradle.internal.fromJsDependencies @@ -42,7 +42,7 @@ public fun Project.configureKScience( if (explicitApi == null) explicitApiWarning() } - tasks.withType { + tasks.withType { kotlinOptions { jvmTarget = KScienceVersions.JVM_TARGET.toString() freeCompilerArgs = freeCompilerArgs + defaultJvmArgs