Skip to content

Commit ca2f924

Browse files
committed
update docs
1 parent 5add8bf commit ca2f924

File tree

2 files changed

+41
-3
lines changed

2 files changed

+41
-3
lines changed

build.gradle.kts

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.jetbrains.dokka.gradle.DokkaTask
12
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
23

34
plugins {
@@ -172,7 +173,6 @@ signing {
172173
sign(publishing.publications["jvm"])
173174
}
174175

175-
176176
// get signing confs interactivly if needed
177177
gradle.taskGraph.whenReady {
178178
val alreadyConfigured = with(project.extra) {
@@ -184,8 +184,10 @@ gradle.taskGraph.whenReady {
184184
// a CI environment)
185185
val console = System.console()
186186
requireNotNull(console) { "Could not get signing config: please provide yours in the gradle.properties file." }
187-
console.printf("\n\nWe have to sign some things in this build." +
188-
"\n\nPlease enter your signing details.\n\n")
187+
console.printf(
188+
"\n\nWe have to sign some things in this build." +
189+
"\n\nPlease enter your signing details.\n\n"
190+
)
189191

190192
val id = console.readLine("PGP Key Id: ")
191193
val file = console.readLine("PGP Secret Key Ring File (absolute path): ")
@@ -200,3 +202,36 @@ gradle.taskGraph.whenReady {
200202
console.printf("\nThanks.\n\n")
201203
}
202204
}
205+
206+
tasks {
207+
val dokka by getting(DokkaTask::class) {
208+
outputDirectory = "docs"
209+
outputFormat = "html"
210+
211+
multiplatform {
212+
val js by creating {}
213+
val jvm by creating {}
214+
215+
register("common") {}
216+
217+
register("global") {
218+
sourceLink {
219+
path = "./"
220+
url = "https://github.com/adamint/spotify-web-api-kotlin/tree/master/"
221+
lineSuffix = "#L"
222+
}
223+
224+
sourceRoot {
225+
path = kotlin.sourceSets.getByName("jvmMain").kotlin.srcDirs.first().toString()
226+
}
227+
sourceRoot {
228+
path = kotlin.sourceSets.getByName("commonMain").kotlin.srcDirs.first().toString()
229+
}
230+
}
231+
}
232+
}
233+
234+
"publish" {
235+
dependsOn(dokka)
236+
}
237+
}

src/jvmMain/kotlin/com/adamratzman/spotify/utils/Concurrency.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ internal actual fun CoroutineScope.schedule(
2525
}
2626
}
2727

28+
/**
29+
* Return this [SpotifyRestAction] as a normal [CompletableFuture]
30+
*/
2831
fun <T> SpotifyRestAction<T>.asFuture() = CompletableFuture.supplyAsync(::complete)

0 commit comments

Comments
 (0)