Move copy dependencies to platform configuration

This commit is contained in:
Alexander Nozik 2020-11-27 22:42:44 +03:00
parent 1b7a2038ed
commit 3108f16dea

View File

@ -65,6 +65,11 @@ open class KScienceCommonPlugin : Plugin<Project> {
} }
} }
} }
(tasks.findByName("processResources") as? Copy)?.apply {
fromDependencies("runtimeClasspath")
}
} }
pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") { pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") {
@ -114,14 +119,16 @@ open class KScienceCommonPlugin : Plugin<Project> {
} }
} }
} }
(tasks.findByName("jsProcessResources") as? Copy)?.apply {
fromDependencies("jsRuntimeClasspath")
}
} }
} }
afterEvaluate { afterEvaluate {
extensions.findByType<JavaPluginExtension>()?.apply { extensions.findByType<JavaPluginExtension>()?.apply {
targetCompatibility = KScienceVersions.JVM_TARGET targetCompatibility = KScienceVersions.JVM_TARGET
//withSourcesJar()
//withJavadocJar()
} }
tasks.apply { tasks.apply {
@ -134,14 +141,6 @@ open class KScienceCommonPlugin : Plugin<Project> {
withType<Test> { withType<Test> {
useJUnitPlatform() useJUnitPlatform()
} }
(findByName("processResources") as? Copy)?.apply {
fromDependencies("runtimeClasspath")
}
(findByName("jsProcessResources") as? Copy)?.apply {
fromDependencies("jsRuntimeClasspath")
}
} }
} }
} }