From 3108f16dea82fcca2e21e949aed319563073f857 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 27 Nov 2020 22:42:44 +0300 Subject: [PATCH] Move copy dependencies to platform configuration --- .../mipt/npm/gradle/KScienceCommonPlugin.kt | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceCommonPlugin.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceCommonPlugin.kt index d919907..405b3a5 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceCommonPlugin.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceCommonPlugin.kt @@ -65,6 +65,11 @@ open class KScienceCommonPlugin : Plugin { } } } + + (tasks.findByName("processResources") as? Copy)?.apply { + fromDependencies("runtimeClasspath") + } + } pluginManager.withPlugin("org.jetbrains.kotlin.multiplatform") { @@ -114,14 +119,16 @@ open class KScienceCommonPlugin : Plugin { } } } + + (tasks.findByName("jsProcessResources") as? Copy)?.apply { + fromDependencies("jsRuntimeClasspath") + } } } afterEvaluate { extensions.findByType()?.apply { targetCompatibility = KScienceVersions.JVM_TARGET - //withSourcesJar() - //withJavadocJar() } tasks.apply { @@ -134,14 +141,6 @@ open class KScienceCommonPlugin : Plugin { withType { useJUnitPlatform() } - - (findByName("processResources") as? Copy)?.apply { - fromDependencies("runtimeClasspath") - } - - (findByName("jsProcessResources") as? Copy)?.apply { - fromDependencies("jsRuntimeClasspath") - } } } }