Skip to content

Commit

Permalink
Merge pull request #147 from kennethshackleton/fix-kdoc
Browse files Browse the repository at this point in the history
Publish kdoc jar for AndroidLib
  • Loading branch information
kennethshackleton authored Jul 16, 2021
2 parents eb0a085 + f800e87 commit 32f6675
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ jobs:
- run: pip install mkdocs-material
- name: 'Dokka'
run: |
./gradlew :AndroidLib:dokkaGfm :ApiLib:dokkaGfm
./gradlew :dokkaGfmMultiModule
cp -R build/dokka/gfmMultiModule docs/kdoc
- name: 'Set version'
run: echo "VERSION=$(grep -hnr 'selekt.versionName' gradle.properties | sed 's/.*=//')" >> $GITHUB_ENV
- name: 'Mkdocs'
Expand Down
9 changes: 9 additions & 0 deletions AndroidLib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ afterEvaluate {
tasks.register("assembleSelekt") {
dependsOn("assembleRelease")
dependsOn("sourcesJar")
dependsOn("dokkaHtmlJar")
}

tasks.register<Jar>("sourcesJar") {
Expand All @@ -108,6 +109,13 @@ tasks.register<Jar>("sourcesJar") {
setProperty("archiveClassifier", "sources")
}

tasks.register<Jar>("dokkaHtmlJar") {
dependsOn("dokkaHtml")
setProperty("archiveBaseName", "selekt")
setProperty("archiveClassifier", "kdoc")
from("$buildDir/dokka/html")
}

licensee {
allow("Apache-2.0")
}
Expand All @@ -124,6 +132,7 @@ afterEvaluate {
description.set("Selekt Android SQLite library.")
}
artifact("$buildDir/libs/selekt-sources.jar") { classifier = "sources" }
artifact("$buildDir/libs/selekt-kdoc.jar") { classifier = "javadoc" }
}.also {
signing { sign(it) }
}
Expand Down
1 change: 0 additions & 1 deletion SQLite3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ repositories {

plugins {
kotlin("jvm")
id("org.jetbrains.dokka")
`maven-publish`
signing
}
Expand Down
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

import io.gitlab.arturbosch.detekt.Detekt
import java.net.URL
import java.util.Locale
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
Expand Down Expand Up @@ -150,9 +151,10 @@ subprojects {

pluginManager.withPlugin("org.jetbrains.dokka") {
tasks.withType<DokkaTask>().configureEach {
moduleName.set("Selekt")
dokkaSourceSets.named("main") {
sourceLink {
remoteUrl.set(java.net.URL("https://github.com/bloomberg/selekt/tree/master/" +
remoteUrl.set(URL("https://github.com/bloomberg/selekt/tree/master/" +
"${this@configureEach.project.name}/src/main/kotlin"))
localDirectory.set(file("src/main/kotlin"))
}
Expand All @@ -161,7 +163,6 @@ subprojects {
noAndroidSdkLink.set(false)
noJdkLink.set(false)
noStdlibLink.set(false)
outputDirectory.set(File("$rootDir/docs/kdoc"))
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,4 @@ nav:
- 'Overview': index.md
- 'Getting started': getting_started.md
- 'Native libraries': native_libraries.md
- 'API':
- 'Android': kdoc/-android-lib/com.bloomberg.selekt.android/index.md
- 'Room': kdoc/-android-lib/com.bloomberg.selekt.android.support/index.md
- 'API': kdoc/AndroidLib/index.md

0 comments on commit 32f6675

Please sign in to comment.