-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: hfhbd <[email protected]>
- Loading branch information
Showing
3 changed files
with
27 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import Build_gradle.MavenPomFile | ||
import kotlinx.html.js.packageJson | ||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl | ||
|
||
|
@@ -11,19 +9,12 @@ plugins { | |
kotlin("multiplatform") version "1.9.22" | ||
id("maven-publish") | ||
id("signing") | ||
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2" | ||
} | ||
|
||
group = "org.jetbrains.kotlinx" | ||
version = "0.11.0" | ||
|
||
buildscript { | ||
dependencies { | ||
classpath("org.jetbrains.kotlinx:binary-compatibility-validator:0.13.2") | ||
} | ||
} | ||
|
||
apply(plugin = "binary-compatibility-validator") | ||
|
||
/** | ||
* If "release" profile is used the "-SNAPSHOT" suffix of the version is removed. | ||
*/ | ||
|
@@ -85,7 +76,7 @@ kotlin { | |
jvm { | ||
mavenPublication { | ||
groupId = group as String | ||
pom { name by "${project.name}-jvm" } | ||
pom { name = "${project.name}-jvm" } | ||
|
||
artifact(emptyJar) { | ||
classifier = "javadoc" | ||
|
@@ -104,7 +95,7 @@ kotlin { | |
|
||
mavenPublication { | ||
groupId = group as String | ||
pom { name by "${project.name}-js" } | ||
pom { name = "${project.name}-js" } | ||
} | ||
} | ||
@OptIn(ExperimentalWasmDsl::class) | ||
|
@@ -114,7 +105,7 @@ kotlin { | |
|
||
mavenPublication { | ||
groupId = group as String | ||
pom { name by "${project.name}-wasm-js" } | ||
pom { name = "${project.name}-wasm-js" } | ||
} | ||
} | ||
|
||
|
@@ -151,7 +142,7 @@ kotlin { | |
groupId = group as String | ||
artifactId = "${project.name}-common" | ||
pom { | ||
name by "${project.name}-common" | ||
name = "${project.name}-common" | ||
} | ||
} | ||
} | ||
|
@@ -161,22 +152,15 @@ kotlin { | |
jvmToolchain(8) | ||
|
||
sourceSets { | ||
commonMain { | ||
dependencies { | ||
implementation(kotlin("stdlib")) | ||
} | ||
} | ||
|
||
commonTest { | ||
dependencies { | ||
implementation(kotlin("test")) | ||
} | ||
} | ||
|
||
} | ||
} | ||
|
||
tasks.withType<Jar> { | ||
tasks.withType<Jar>().configureEach { | ||
manifest { | ||
attributes += sortedMapOf( | ||
"Built-By" to System.getProperty("user.name"), | ||
|
@@ -221,46 +205,42 @@ typealias MavenPomFile = MavenPom | |
fun MavenPomFile.config(config: MavenPomFile.() -> Unit = {}) { | ||
config() | ||
|
||
url by "https://github.com/Kotlin/kotlinx.html" | ||
name by "kotlinx.html" | ||
description by "A kotlinx.html library provides DSL to build HTML to Writer/Appendable or DOM at JVM and browser (or other JavaScript engine) for better Kotlin programming for Web." | ||
url = "https://github.com/Kotlin/kotlinx.html" | ||
name = "kotlinx.html" | ||
description = "A kotlinx.html library provides DSL to build HTML to Writer/Appendable or DOM at JVM and browser (or other JavaScript engine) for better Kotlin programming for Web." | ||
|
||
licenses { | ||
license { | ||
name by "The Apache License, Version 2.0" | ||
url by "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
name = "The Apache License, Version 2.0" | ||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
|
||
scm { | ||
connection by "scm:git:[email protected]:Kotlin/kotlinx.html.git" | ||
url by "https://github.com/Kotlin/kotlinx.html" | ||
tag by "HEAD" | ||
connection = "scm:git:[email protected]:Kotlin/kotlinx.html.git" | ||
url = "https://github.com/Kotlin/kotlinx.html" | ||
tag = "HEAD" | ||
} | ||
|
||
developers { | ||
developer { | ||
name by "Sergey Mashkov" | ||
organization by "JetBrains s.r.o." | ||
name = "Sergey Mashkov" | ||
organization = "JetBrains s.r.o." | ||
roles to "developer" | ||
} | ||
|
||
developer { | ||
name by "Anton Dmitriev" | ||
organization by "JetBrains s.r.o." | ||
name = "Anton Dmitriev" | ||
organization = "JetBrains s.r.o." | ||
roles to "developer" | ||
} | ||
} | ||
} | ||
|
||
tasks.withType<GenerateModuleMetadata> { | ||
tasks.withType<GenerateModuleMetadata>().configureEach { | ||
enabled = true | ||
} | ||
|
||
infix fun <T> Property<T>.by(value: T) { | ||
set(value) | ||
} | ||
|
||
val signingKey = System.getenv("SIGN_KEY_ID") | ||
val signingKeyPassphrase = System.getenv("SIGN_KEY_PASSPHRASE") | ||
|
||
|
@@ -274,14 +254,13 @@ if (!signingKey.isNullOrBlank()) { | |
} | ||
} | ||
|
||
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> { | ||
val nodeM1Version = "16.13.1" | ||
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = nodeM1Version | ||
} | ||
|
||
rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin::class.java) { | ||
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension>().ignoreScripts = false | ||
} | ||
|
||
tasks.getByName("jsBrowserTest").dependsOn("wasmJsTestTestDevelopmentExecutableCompileSync") | ||
tasks.getByName("wasmJsBrowserTest").dependsOn("jsTestTestDevelopmentExecutableCompileSync") | ||
tasks.named("jsBrowserTest") { | ||
dependsOn("wasmJsTestTestDevelopmentExecutableCompileSync") | ||
} | ||
tasks.named("wasmJsBrowserTest") { | ||
dependsOn("jsTestTestDevelopmentExecutableCompileSync") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
plugins { | ||
kotlin("jvm") version "1.9.21" | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation(kotlin("stdlib")) | ||
implementation("com.sun.xsom:xsom:20140925") | ||
implementation("com.squareup:kotlinpoet:1.15.3") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters