Fix JVM/JS library dependency extensions
This commit is contained in:
parent
c700515d3f
commit
99fdcfe60d
@ -7,7 +7,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "scientifik"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
|
@ -6,7 +6,6 @@ import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.findByType
|
||||
import org.gradle.kotlin.dsl.invoke
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
|
||||
|
||||
internal fun Project.useDependency(vararg pairs: Pair<String, String>) {
|
||||
pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
|
||||
@ -25,9 +24,8 @@ internal fun Project.useDependency(vararg pairs: Pair<String, String>) {
|
||||
pairs.find { it.first == "jvmMain" }?.let { dep ->
|
||||
pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
|
||||
sourceSets.findByName("main")?.apply {
|
||||
this as KotlinSourceSet
|
||||
dependencies {
|
||||
implementation(dep)
|
||||
dependencies.apply{
|
||||
add(implementationConfigurationName, dep.second)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -36,9 +34,10 @@ internal fun Project.useDependency(vararg pairs: Pair<String, String>) {
|
||||
pairs.find { it.first == "jsMain" }?.let { dep ->
|
||||
pluginManager.withPlugin("org.jetbrains.kotlin.js") {
|
||||
sourceSets.findByName("main")?.apply {
|
||||
this as KotlinSourceSet
|
||||
dependencies {
|
||||
implementation(dep)
|
||||
sourceSets.findByName("main")?.apply {
|
||||
dependencies.apply{
|
||||
add(implementationConfigurationName, dep.second)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user