Skip to content

Commit 5d3c362

Browse files
authored
Kgp 1.7.0 (#58)
* Closes #55 * Workaround for ListProperty::addAllLater Closes #55
1 parent 31431dc commit 5d3c362

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

npm-publish-gradle-plugin/src/main/kotlin/config/kotlinJsTarget.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ internal fun ProjectEnhancer.configure(target: KotlinJsTargetDsl) {
2525
if (target !is KotlinJsIrTarget) {
2626
warn { "${target.name} Kotlin/JS target is not using IR compiler - skipping..." }
2727
} else {
28-
2928
extension.packages.register(target.name) { pkg ->
3029
val binary = provider<JsIrBinary> {
3130
when (val it = target.binaries.find { it.mode == KotlinJsBinaryMode.PRODUCTION }) {
@@ -106,4 +105,8 @@ private fun ProjectEnhancer.resolveDependencies(
106105
version.set(dependency.version)
107106
}
108107
}
108+
}.let {
109+
objects.listProperty(NpmDependency::class.java).apply {
110+
addAll(it)
111+
}
109112
}

npm-publish-gradle-plugin/src/main/kotlin/extension/domain/NpmDependency.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import org.gradle.api.NamedDomainObjectContainer
55
import org.gradle.api.provider.Property
66
import org.gradle.api.tasks.Input
77
import org.gradle.api.tasks.Optional
8-
import kotlin.math.abs
98

109
/**
1110
* A simple representation of a npm dependency
@@ -58,11 +57,6 @@ public interface NpmDependency : NamedInput {
5857
PEER,
5958
DEV,
6059
NORMAL;
61-
62-
/**
63-
* Type priority in descending order
64-
*/
65-
public inline val priority: Int get() = abs(0 - ordinal)
6660
}
6761
}
6862

0 commit comments

Comments
 (0)