1
- import Build_gradle.MavenPomFile
2
- import kotlinx.html.js.packageJson
3
1
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
4
2
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
5
3
@@ -11,19 +9,12 @@ plugins {
11
9
kotlin(" multiplatform" ) version " 1.9.22"
12
10
id(" maven-publish" )
13
11
id(" signing" )
12
+ id(" org.jetbrains.kotlinx.binary-compatibility-validator" ) version " 0.13.2"
14
13
}
15
14
16
15
group = " org.jetbrains.kotlinx"
17
16
version = " 0.11.0"
18
17
19
- buildscript {
20
- dependencies {
21
- classpath(" org.jetbrains.kotlinx:binary-compatibility-validator:0.13.2" )
22
- }
23
- }
24
-
25
- apply (plugin = " binary-compatibility-validator" )
26
-
27
18
/* *
28
19
* If "release" profile is used the "-SNAPSHOT" suffix of the version is removed.
29
20
*/
@@ -85,7 +76,7 @@ kotlin {
85
76
jvm {
86
77
mavenPublication {
87
78
groupId = group as String
88
- pom { name by " ${project.name} -jvm" }
79
+ pom { name = " ${project.name} -jvm" }
89
80
90
81
artifact(emptyJar) {
91
82
classifier = " javadoc"
@@ -104,7 +95,7 @@ kotlin {
104
95
105
96
mavenPublication {
106
97
groupId = group as String
107
- pom { name by " ${project.name} -js" }
98
+ pom { name = " ${project.name} -js" }
108
99
}
109
100
}
110
101
@OptIn(ExperimentalWasmDsl ::class )
@@ -114,7 +105,7 @@ kotlin {
114
105
115
106
mavenPublication {
116
107
groupId = group as String
117
- pom { name by " ${project.name} -wasm-js" }
108
+ pom { name = " ${project.name} -wasm-js" }
118
109
}
119
110
}
120
111
@@ -151,7 +142,7 @@ kotlin {
151
142
groupId = group as String
152
143
artifactId = " ${project.name} -common"
153
144
pom {
154
- name by " ${project.name} -common"
145
+ name = " ${project.name} -common"
155
146
}
156
147
}
157
148
}
@@ -161,22 +152,15 @@ kotlin {
161
152
jvmToolchain(8 )
162
153
163
154
sourceSets {
164
- commonMain {
165
- dependencies {
166
- implementation(kotlin(" stdlib" ))
167
- }
168
- }
169
-
170
155
commonTest {
171
156
dependencies {
172
157
implementation(kotlin(" test" ))
173
158
}
174
159
}
175
-
176
160
}
177
161
}
178
162
179
- tasks.withType<Jar > {
163
+ tasks.withType<Jar >().configureEach {
180
164
manifest {
181
165
attributes + = sortedMapOf(
182
166
" Built-By" to System .getProperty(" user.name" ),
@@ -221,46 +205,42 @@ typealias MavenPomFile = MavenPom
221
205
fun MavenPomFile.config (config : MavenPomFile .() -> Unit = {}) {
222
206
config()
223
207
224
- url by " https://github.com/Kotlin/kotlinx.html"
225
- name by " kotlinx.html"
226
- 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."
208
+ url = " https://github.com/Kotlin/kotlinx.html"
209
+ name = " kotlinx.html"
210
+ 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."
227
211
228
212
licenses {
229
213
license {
230
- name by " The Apache License, Version 2.0"
231
- url by " https://www.apache.org/licenses/LICENSE-2.0.txt"
214
+ name = " The Apache License, Version 2.0"
215
+ url = " https://www.apache.org/licenses/LICENSE-2.0.txt"
232
216
}
233
217
}
234
218
235
219
scm {
236
- connection by " scm:git:git@github.com:Kotlin/kotlinx.html.git"
237
- url by " https://github.com/Kotlin/kotlinx.html"
238
- tag by " HEAD"
220
+ connection = " scm:git:git@github.com:Kotlin/kotlinx.html.git"
221
+ url = " https://github.com/Kotlin/kotlinx.html"
222
+ tag = " HEAD"
239
223
}
240
224
241
225
developers {
242
226
developer {
243
- name by " Sergey Mashkov"
244
- organization by " JetBrains s.r.o."
227
+ name = " Sergey Mashkov"
228
+ organization = " JetBrains s.r.o."
245
229
roles to " developer"
246
230
}
247
231
248
232
developer {
249
- name by " Anton Dmitriev"
250
- organization by " JetBrains s.r.o."
233
+ name = " Anton Dmitriev"
234
+ organization = " JetBrains s.r.o."
251
235
roles to " developer"
252
236
}
253
237
}
254
238
}
255
239
256
- tasks.withType<GenerateModuleMetadata > {
240
+ tasks.withType<GenerateModuleMetadata >().configureEach {
257
241
enabled = true
258
242
}
259
243
260
- infix fun <T > Property<T>.by (value : T ) {
261
- set(value)
262
- }
263
-
264
244
val signingKey = System .getenv(" SIGN_KEY_ID" )
265
245
val signingKeyPassphrase = System .getenv(" SIGN_KEY_PASSPHRASE" )
266
246
@@ -274,14 +254,13 @@ if (!signingKey.isNullOrBlank()) {
274
254
}
275
255
}
276
256
277
- rootProject.plugins.withType< org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin > {
278
- val nodeM1Version = " 16.13.1"
279
- rootProject.the< org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension > ().nodeVersion = nodeM1Version
280
- }
281
-
282
257
rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin ::class .java) {
283
258
rootProject.the< org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension > ().ignoreScripts = false
284
259
}
285
260
286
- tasks.getByName(" jsBrowserTest" ).dependsOn(" wasmJsTestTestDevelopmentExecutableCompileSync" )
287
- tasks.getByName(" wasmJsBrowserTest" ).dependsOn(" jsTestTestDevelopmentExecutableCompileSync" )
261
+ tasks.named(" jsBrowserTest" ) {
262
+ dependsOn(" wasmJsTestTestDevelopmentExecutableCompileSync" )
263
+ }
264
+ tasks.named(" wasmJsBrowserTest" ) {
265
+ dependsOn(" jsTestTestDevelopmentExecutableCompileSync" )
266
+ }
0 commit comments