Fix dependency configuration
This commit is contained in:
parent
723a959a0b
commit
be571a9028
@ -112,7 +112,7 @@ open class KScienceCommonPlugin : Plugin<Project> {
|
||||
afterEvaluate {
|
||||
extensions.findByType<JavaPluginExtension>()?.apply {
|
||||
targetCompatibility = KScienceVersions.JVM_TARGET
|
||||
withSourcesJar()
|
||||
//withSourcesJar()
|
||||
//withJavadocJar()
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,8 @@ package ru.mipt.npm.gradle
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.invoke
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJsProjectExtension
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
||||
|
||||
enum class DependencyConfiguration {
|
||||
@ -37,10 +39,12 @@ internal fun Project.useDependency(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
pairs.find { it.first == "jvm" }?.let { dep ->
|
||||
pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
|
||||
configure<KotlinJvmProjectExtension> {
|
||||
sourceSets.findByName(dependencySourceSet.setName)?.apply {
|
||||
dependencies.apply {
|
||||
val configurationName = when (dependencyConfiguration) {
|
||||
@ -53,9 +57,11 @@ internal fun Project.useDependency(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pairs.find { it.first == "js" }?.let { dep ->
|
||||
pluginManager.withPlugin("org.jetbrains.kotlin.js") {
|
||||
configure<KotlinJsProjectExtension> {
|
||||
sourceSets.findByName(dependencySourceSet.setName)?.apply {
|
||||
dependencies.apply {
|
||||
val configurationName = when (dependencyConfiguration) {
|
||||
@ -69,8 +75,6 @@ internal fun Project.useDependency(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
internal fun Project.useCommonDependency(
|
||||
@ -89,8 +93,12 @@ internal fun Project.useCommonDependency(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
withPlugin("org.jetbrains.kotlin.jvm") {
|
||||
configure<KotlinJvmProjectExtension> {
|
||||
sourceSets.findByName(dependencySourceSet.setName)?.apply {
|
||||
dependencies.apply {
|
||||
val configurationName = when (dependencyConfiguration) {
|
||||
@ -102,7 +110,9 @@ internal fun Project.useCommonDependency(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
withPlugin("org.jetbrains.kotlin.js") {
|
||||
configure<KotlinJsProjectExtension> {
|
||||
sourceSets.findByName(dependencySourceSet.setName)?.apply {
|
||||
dependencies.apply {
|
||||
val configurationName = when (dependencyConfiguration) {
|
||||
@ -115,5 +125,4 @@ internal fun Project.useCommonDependency(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user