diff --git a/npm-publish-gradle-plugin/src/main/kotlin/config/kotlinJsTarget.kt b/npm-publish-gradle-plugin/src/main/kotlin/config/kotlinJsTarget.kt index f8211327..86ed347d 100644 --- a/npm-publish-gradle-plugin/src/main/kotlin/config/kotlinJsTarget.kt +++ b/npm-publish-gradle-plugin/src/main/kotlin/config/kotlinJsTarget.kt @@ -25,7 +25,6 @@ internal fun ProjectEnhancer.configure(target: KotlinJsTargetDsl) { if (target !is KotlinJsIrTarget) { warn { "${target.name} Kotlin/JS target is not using IR compiler - skipping..." } } else { - extension.packages.register(target.name) { pkg -> val binary = provider { when (val it = target.binaries.find { it.mode == KotlinJsBinaryMode.PRODUCTION }) { @@ -106,4 +105,8 @@ private fun ProjectEnhancer.resolveDependencies( version.set(dependency.version) } } +}.let { + objects.listProperty(NpmDependency::class.java).apply { + addAll(it) + } } diff --git a/npm-publish-gradle-plugin/src/main/kotlin/extension/domain/NpmDependency.kt b/npm-publish-gradle-plugin/src/main/kotlin/extension/domain/NpmDependency.kt index 2e1f6cd0..b123bc8e 100644 --- a/npm-publish-gradle-plugin/src/main/kotlin/extension/domain/NpmDependency.kt +++ b/npm-publish-gradle-plugin/src/main/kotlin/extension/domain/NpmDependency.kt @@ -5,7 +5,6 @@ import org.gradle.api.NamedDomainObjectContainer import org.gradle.api.provider.Property import org.gradle.api.tasks.Input import org.gradle.api.tasks.Optional -import kotlin.math.abs /** * A simple representation of a npm dependency @@ -58,11 +57,6 @@ public interface NpmDependency : NamedInput { PEER, DEV, NORMAL; - - /** - * Type priority in descending order - */ - public inline val priority: Int get() = abs(0 - ordinal) } }