Use kotlin 1.8.10

This commit is contained in:
Alexander Nozik 2023-02-03 14:11:03 +03:00
parent a26c7f6df0
commit a78a4f6118
2 changed files with 38 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[versions] [versions]
tools = "0.14.0-kotlin-1.8.0" tools = "0.14.0-kotlin-1.8.10"
kotlin = "1.8.0" kotlin = "1.8.10"
atomicfu = "0.19.0" atomicfu = "0.19.0"
binary-compatibility-validator = "0.12.1" binary-compatibility-validator = "0.12.1"
changelog = "2.0.0" changelog = "2.0.0"

View File

@ -128,6 +128,42 @@ public open class KScienceExtension(public val project: Project) {
} }
} }
public fun jvmDependencies(dependencyBlock: KotlinDependencyHandler.() -> Unit) {
project.pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
project.configure<KotlinJvmProjectExtension> {
sourceSets.getByName("main") {
dependencies(dependencyBlock)
}
}
}
project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
project.configure<KotlinMultiplatformExtension> {
sourceSets.getByName("jvmMain") {
dependencies(dependencyBlock)
}
}
}
}
public fun jsDependencies(dependencyBlock: KotlinDependencyHandler.() -> Unit) {
project.pluginManager.withPlugin("org.jetbrains.kotlin.js") {
project.configure<KotlinJsProjectExtension> {
sourceSets.getByName("main") {
dependencies(dependencyBlock)
}
}
}
project.pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
project.configure<KotlinMultiplatformExtension> {
sourceSets.getByName("jsMain") {
dependencies(dependencyBlock)
}
}
}
}
/** /**
* Mark this module as an application module. JVM application should be enabled separately * Mark this module as an application module. JVM application should be enabled separately
*/ */