Skip to content

Commit c47cefa

Browse files
committed
move gradle tasks into the tasks block
1 parent bdb8edb commit c47cefa

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

build.gradle.kts

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -111,34 +111,6 @@ kotlin {
111111
}
112112
}
113113

114-
tasks.getByName<KotlinJsCompile>("compileKotlinJs") {
115-
kotlinOptions {
116-
moduleKind = "umd"
117-
noStdlib = false
118-
metaInfo = true
119-
}
120-
}
121-
tasks.named<Test>("jvmTest") {
122-
useJUnitPlatform()
123-
}
124-
125-
spotless {
126-
kotlin {
127-
target("**/*.kt")
128-
licenseHeader("/* Spotify Web API, Kotlin Wrapper; MIT License, 2017-2020; Original author: Adam Ratzman */")
129-
ktlint()
130-
}
131-
}
132-
133-
nexusStaging {
134-
packageGroup = "com.adamratzman"
135-
}
136-
137-
138-
tasks.withType<GenerateModuleMetadata> {
139-
enabled = false
140-
}
141-
142114
publishing {
143115
publications {
144116
val jvm by getting(MavenPublication::class) {
@@ -214,7 +186,7 @@ signing {
214186
sign(publishing.publications["jvm"])
215187
}
216188

217-
// get signing confs interactivly if needed
189+
// get signing confs interactively if needed
218190
gradle.taskGraph.whenReady {
219191
val alreadyConfigured = with(project.extra) {
220192
(has("signing.keyId") && has("signing.secretKeyRingFile") && has("signing.password"))
@@ -300,6 +272,36 @@ tasks {
300272
archives(javadocJar)
301273
}
302274

275+
spotless {
276+
kotlin {
277+
target("**/*.kt")
278+
licenseHeader("/* Spotify Web API, Kotlin Wrapper; MIT License, 2017-2020; Original author: Adam Ratzman */")
279+
ktlint()
280+
}
281+
}
282+
283+
nexusStaging {
284+
packageGroup = "com.adamratzman"
285+
}
286+
287+
288+
getByName<KotlinJsCompile>("compileKotlinJs") {
289+
kotlinOptions {
290+
moduleKind = "umd"
291+
noStdlib = false
292+
metaInfo = true
293+
}
294+
}
295+
296+
getByName<Test>("jvmTest") {
297+
useJUnitPlatform()
298+
}
299+
300+
withType<GenerateModuleMetadata> {
301+
enabled = false
302+
}
303+
304+
303305
val publishJvm by registering(Task::class) {
304306
dependsOn.add(check)
305307
dependsOn.add(dokka)

0 commit comments

Comments
 (0)