[K/JS] Prepare JS Plain Objects plugin to publication

This commit is contained in:
Artem Kobzar
2024-01-17 10:52:58 +00:00
committed by Space Team
parent 561be747c1
commit dfe2d8651e
53 changed files with 479 additions and 393 deletions
@@ -0,0 +1,42 @@
import plugins.configureDefaultPublishing
import plugins.configureKotlinPomAttributes
description = "Runtime library for the JS Plain Objects compiler plugin"
plugins {
kotlin("js")
`maven-publish`
}
group = "org.jetbrains.kotlin"
kotlin {
js {
browser()
nodejs()
compilations["main"].defaultSourceSet {
dependencies {
compileOnly(kotlin("stdlib-js"))
}
}
}
}
val emptyJavadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")
}
configureDefaultPublishing()
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "kotlin-js-plain-objects"
from(components["kotlin"])
configureKotlinPomAttributes(project, "Annotations library for the JS Plain Objects compiler plugin", packaging = "klib")
}
withType<MavenPublication> {
artifact(emptyJavadocJar)
}
}
}
@@ -0,0 +1,11 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package kotlinx.js
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY)
public annotation class JsPlainObject