Skip to content

Commit a19b37f

Browse files
committed
refactor build.gradle.kts
1 parent 8446d4f commit a19b37f

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

channel-event-bus/build.gradle.kts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,28 @@ kotlin {
1616
explicitApi()
1717

1818
jvmToolchain {
19-
languageVersion.set(JavaLanguageVersion.of(libs.versions.java.toolchain.get()))
20-
vendor.set(JvmVendorSpec.AZUL)
19+
languageVersion = JavaLanguageVersion.of(libs.versions.java.toolchain.get())
20+
vendor = JvmVendorSpec.AZUL
2121
}
2222

2323
jvm {
2424
compilations.configureEach {
25-
compilerOptions.configure {
26-
jvmTarget.set(JvmTarget.fromTarget(libs.versions.java.target.get()))
25+
compileTaskProvider.configure {
26+
compilerOptions {
27+
jvmTarget = JvmTarget.fromTarget(libs.versions.java.target.get())
28+
}
2729
}
2830
}
2931
}
3032

3133
js(IR) {
3234
moduleName = property("POM_ARTIFACT_ID")!!.toString()
3335
compilations.configureEach {
34-
compilerOptions.configure {
35-
sourceMap.set(true)
36-
moduleKind.set(org.jetbrains.kotlin.gradle.dsl.JsModuleKind.MODULE_COMMONJS)
36+
compileTaskProvider.configure {
37+
compilerOptions {
38+
sourceMap = true
39+
moduleKind = org.jetbrains.kotlin.gradle.dsl.JsModuleKind.MODULE_COMMONJS
40+
}
3741
}
3842
}
3943
browser()
@@ -136,9 +140,10 @@ tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
136140
externalDocumentationLink("https://kotlinlang.org/api/kotlinx.coroutines/")
137141

138142
sourceLink {
139-
localDirectory.set(projectDir.resolve("src"))
140-
remoteUrl.set(URL("https://github.com/Kotlin-Multiplatform-Foundation/kotlin-channel-event-bus/tree/master/channel-event-bus/src"))
141-
remoteLineSuffix.set("#L")
143+
localDirectory = projectDir.resolve("src")
144+
remoteUrl =
145+
URL("https://github.com/Kotlin-Multiplatform-Foundation/kotlin-channel-event-bus/tree/master/channel-event-bus/src")
146+
remoteLineSuffix = "#L"
142147
}
143148
}
144149
}

0 commit comments

Comments
 (0)