@@ -30,6 +30,10 @@ buildscript {
30
30
}
31
31
}
32
32
33
+ dependencies {
34
+ dokkaHtmlPlugin(" org.jetbrains.dokka:kotlin-as-java-plugin:1.4.20" )
35
+ }
36
+
33
37
group = " com.adamratzman"
34
38
version = " 3.2.15"
35
39
@@ -51,6 +55,7 @@ android {
51
55
defaultConfig {
52
56
minSdkVersion(15 )
53
57
targetSdkVersion(30 )
58
+ compileSdkVersion(30 )
54
59
versionCode = 1
55
60
versionName = " 1.0"
56
61
testInstrumentationRunner = " android.support.test.runner.AndroidJUnitRunner"
@@ -83,7 +88,7 @@ val dokkaJar by tasks.registering(Jar::class) {
83
88
group = JavaBasePlugin .DOCUMENTATION_GROUP
84
89
description = " Docs"
85
90
classifier = " javadoc"
86
- from(tasks.dokka )
91
+ from(tasks.dokkaHtml )
87
92
}
88
93
89
94
kotlin {
@@ -209,7 +214,7 @@ kotlin {
209
214
implementation(kotlin(" test" ))
210
215
implementation(kotlin(" test-junit" ))
211
216
implementation(" org.junit.jupiter:junit-jupiter:5.6.2" )
212
- implementation(" com.sparkjava:spark-core:2.9.1 " )
217
+ implementation(" com.sparkjava:spark-core:2.9.3 " )
213
218
implementation(" org.mockito:mockito-core:3.3.3" )
214
219
implementation(" org.spekframework.spek2:spek-dsl-jvm:$spekVersion " )
215
220
runtimeOnly(" org.spekframework.spek2:spek-runner-junit5:$spekVersion " )
@@ -263,46 +268,39 @@ signing {
263
268
}
264
269
265
270
tasks {
266
- val dokka by getting(DokkaTask ::class ) {
267
- outputFormat = " html"
268
- outputDirectory = " $buildDir /javadoc"
271
+ val dokkaHtml by getting(DokkaTask ::class ) {
272
+ outputDirectory.set(projectDir.resolve(" docs" ))
269
273
270
- multiplatform {
274
+ dokkaSourceSets {
271
275
val js by creating {
272
276
sourceLink {
273
- path = " / src"
274
- url = " https://github.com/adamint/spotify-web-api-kotlin/tree/master/"
275
- lineSuffix = " #L"
277
+ localDirectory.set(file( " src" ))
278
+ remoteUrl.set(uri( " https://github.com/adamint/spotify-web-api-kotlin/tree/master/" ).toURL())
279
+ remoteLineSuffix.set( " #L" )
276
280
}
277
281
}
278
282
val jvm by creating {
279
283
sourceLink {
280
- path = " /src"
281
- url = " https://github.com/adamint/spotify-web-api-kotlin/tree/master/"
282
- lineSuffix = " #L"
284
+ localDirectory.set(file(" src" ))
285
+ remoteUrl.set(uri(" https://github.com/adamint/spotify-web-api-kotlin/tree/master/" ).toURL())
286
+ remoteLineSuffix.set(" #L" )
287
+
283
288
}
284
289
}
285
290
286
291
register(" common" ) {
287
292
sourceLink {
288
- path = " / src"
289
- url = " https://github.com/adamint/spotify-web-api-kotlin/tree/master/"
290
- lineSuffix = " #L"
293
+ localDirectory.set(file( " src" ))
294
+ remoteUrl.set(uri( " https://github.com/adamint/spotify-web-api-kotlin/tree/master/" ).toURL())
295
+ remoteLineSuffix.set( " #L" )
291
296
}
292
297
}
293
298
294
299
register(" global" ) {
295
300
sourceLink {
296
- path = " /src"
297
- url = " https://github.com/adamint/spotify-web-api-kotlin/tree/master/"
298
- lineSuffix = " #L"
299
- }
300
-
301
- sourceRoot {
302
- path = kotlin.sourceSets.getByName(" jvmMain" ).kotlin.srcDirs.first().toString()
303
- }
304
- sourceRoot {
305
- path = kotlin.sourceSets.getByName(" commonMain" ).kotlin.srcDirs.first().toString()
301
+ localDirectory.set(file(" src" ))
302
+ remoteUrl.set(uri(" https://github.com/adamint/spotify-web-api-kotlin/tree/master/" ).toURL())
303
+ remoteLineSuffix.set(" #L" )
306
304
}
307
305
}
308
306
}
@@ -327,7 +325,7 @@ tasks {
327
325
328
326
val publishJvm by registering(Task ::class ) {
329
327
dependsOn.add(check)
330
- dependsOn.add(dokka )
328
+ dependsOn.add(dokkaHtml )
331
329
dependsOn.add(" publishJvmPublicationToNexusRepository" )
332
330
}
333
331
0 commit comments