[Gradle, JS] Use JAR archive task type for js ir
This commit is contained in:
committed by
Space Team
parent
5cf1c01273
commit
7794998113
+10
@@ -2045,6 +2045,16 @@ open class NewMultiplatformIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPublishEmptySourceSets() = with(Project("mpp-empty-sources")) {
|
||||
setupWorkingDir()
|
||||
gradleBuildScript().modify(::transformBuildScriptWithPluginsDsl)
|
||||
|
||||
build("publish") {
|
||||
assertSuccessful()
|
||||
}
|
||||
}
|
||||
|
||||
private fun detectNativeEnabledCompilation(): String = when {
|
||||
HostManager.hostIsLinux -> "linuxX64"
|
||||
HostManager.hostIsMingw -> "mingwX64"
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
plugins {
|
||||
kotlin("multiplatform") version "<pluginMarkerVersion>"
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
group = "org.example"
|
||||
version = "1.0-SNAPSHOT"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm {
|
||||
jvmToolchain(8)
|
||||
withJava()
|
||||
}
|
||||
js(IR) {
|
||||
binaries.executable()
|
||||
browser {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["kotlin"])
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven { setUrl("${rootProject.buildDir}/repo") }
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.gradle.targets.js.ir
|
||||
|
||||
import org.gradle.api.attributes.Usage
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.gradle.api.tasks.bundling.Jar
|
||||
import org.gradle.api.tasks.bundling.Zip
|
||||
import org.jetbrains.kotlin.gradle.dsl.JsModuleKind
|
||||
import org.jetbrains.kotlin.gradle.dsl.JsSourceMapEmbedMode
|
||||
@@ -32,7 +33,7 @@ open class KotlinJsIrTargetConfigurator :
|
||||
get() = KLIB_TYPE
|
||||
|
||||
override val archiveTaskType: Class<out Zip>
|
||||
get() = Zip::class.java
|
||||
get() = Jar::class.java
|
||||
|
||||
override fun createTestRun(
|
||||
name: String,
|
||||
|
||||
Reference in New Issue
Block a user