Skip to content

Commit

Permalink
fix dokka for good
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Aug 16, 2023
1 parent c734c31 commit a1122f1
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 72 deletions.
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask

plugins {
id("at.asitplus.gradle.vclib-conventions")
}

//access dokka plugin from conventions plugin's classpath in root project → no need to specify version
apply(plugin = "org.jetbrains.dokka")
tasks.getByName("dokkaHtmlMultiModule") {
(this as DokkaMultiModuleTask)
outputDirectory.set(File("$buildDir/dokka"))
includes.from("README.md")
}

task<Exec>("purge") {
dependsOn("clean")
workingDir = layout.projectDirectory.dir("vclib").asFile
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ kotlin.native.binary.freezing=disabled
kotlin.native.ignoreDisabledTargets=true
kotlin.experimental.tryK2=false

# workaround dokka bug (need to wait for next snapshot build)
org.jetbrains.dokka.classpath.excludePlatformDependencyFiles=true

artifactVersion = 2.1.0-SNAPSHOT
27 changes: 2 additions & 25 deletions vclib-aries/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import at.asitplus.gradle.bouncycastle
import at.asitplus.gradle.commonImplementationDependencies
import at.asitplus.gradle.commonIosExports
import at.asitplus.gradle.exportIosFramework
import at.asitplus.gradle.*

plugins {
kotlin("multiplatform")
Expand All @@ -16,26 +13,6 @@ val artifactVersion: String by extra
group = "at.asitplus.wallet"
version = artifactVersion

val dokkaOutputDir = "$buildDir/dokka"
tasks.dokkaHtml {
// dependsOn(":vclib:transformIosMainCInteropDependenciesMetadataForIde") //task dependency bug workaround
// dependsOn(":vclib-openid:transformIosMainCInteropDependenciesMetadataForIde") //task dependency bug workaround
outputDirectory.set(file(dokkaOutputDir))
}
val deleteDokkaOutputDir by tasks.register<Delete>("deleteDokkaOutputDirectory") {
delete(dokkaOutputDir)
}
val javadocJar = tasks.register<Jar>("javadocJar") {
dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaOutputDir)
}

val signingTasks: TaskCollection<Sign> = tasks.withType<Sign>()
tasks.withType<PublishToMavenRepository>().configureEach {
mustRunAfter(signingTasks)
}

exportIosFramework("VcLibAriesKmm", *commonIosExports(), project(":vclib"))
kotlin {

Expand Down Expand Up @@ -66,10 +43,10 @@ kotlin {

repositories {
maven(uri(rootProject.layout.projectDirectory.dir("kotlinx.serialization").dir("repo")))
// mavenLocal()
mavenCentral()
}

val javadocJar = setupDokka(baseUrl = "https://github.com/a-sit-plus/kmm-vc-library/tree/main/", multiModuleDoc = true)

publishing {
publications {
Expand Down
28 changes: 3 additions & 25 deletions vclib-openid/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import at.asitplus.gradle.bouncycastle
import at.asitplus.gradle.commonImplementationDependencies
import at.asitplus.gradle.commonIosExports
import at.asitplus.gradle.exportIosFramework
import at.asitplus.gradle.*

plugins {
kotlin("multiplatform")
Expand All @@ -16,26 +13,6 @@ val artifactVersion: String by extra
group = "at.asitplus.wallet"
version = artifactVersion

val dokkaOutputDir = "$buildDir/dokka"
tasks.dokkaHtml {
// dependsOn(":vclib:transformIosMainCInteropDependenciesMetadataForIde") //task dependency bug workaround
// dependsOn(":vclib-aries:transformIosMainCInteropDependenciesMetadataForIde") //task dependency bug workaround
outputDirectory.set(file(dokkaOutputDir))
}
val deleteDokkaOutputDir by tasks.register<Delete>("deleteDokkaOutputDirectory") {
delete(dokkaOutputDir)
}
val javadocJar = tasks.register<Jar>("javadocJar") {
dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaOutputDir)
}

val signingTasks: TaskCollection<Sign> = tasks.withType<Sign>()
tasks.withType<PublishToMavenRepository>().configureEach {
mustRunAfter(signingTasks)
}

exportIosFramework("VcLibOpenIdKmm", *commonIosExports(), project(":vclib"))
kotlin {

Expand Down Expand Up @@ -66,10 +43,10 @@ kotlin {

repositories {
maven(uri(rootProject.layout.projectDirectory.dir("kotlinx.serialization").dir("repo")))
// mavenLocal()
mavenCentral()
}

val javadocJar = setupDokka(baseUrl = "https://github.com/a-sit-plus/kmm-vc-library/tree/main/", multiModuleDoc = true)

publishing {
publications {
Expand Down Expand Up @@ -122,3 +99,4 @@ signing {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign(publishing.publications)
}

24 changes: 3 additions & 21 deletions vclib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ val artifactVersion: String by extra
group = "at.asitplus.wallet"
version = artifactVersion

val dokkaOutputDir = "$buildDir/dokka"
tasks.dokkaHtml {
// dependsOn("transformIosMainCInteropDependenciesMetadataForIde") //work around bug
outputDirectory.set(file(dokkaOutputDir))
}
val deleteDokkaOutputDir by tasks.register<Delete>("deleteDokkaOutputDirectory") {
delete(dokkaOutputDir)
}
val javadocJar = tasks.register<Jar>("javadocJar") {
dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaOutputDir)
}

val signingTasks: TaskCollection<Sign> = tasks.withType<Sign>()
tasks.withType<PublishToMavenRepository>().configureEach {
mustRunAfter(signingTasks)
}

exportIosFramework("VcLibKmm", *commonIosExports())
kotlin {

Expand Down Expand Up @@ -68,7 +49,6 @@ kotlin {
}



val commonTest by getting

val iosMain by getting
Expand All @@ -89,11 +69,12 @@ kotlin {

repositories {
maven(uri(rootProject.layout.projectDirectory.dir("kotlinx.serialization").dir("repo")))
// mavenLocal()
mavenCentral()
}


val javadocJar = setupDokka(baseUrl = "https://github.com/a-sit-plus/kmm-vc-library/tree/main/", multiModuleDoc = true)

publishing {
publications {
withType<MavenPublication> {
Expand Down Expand Up @@ -147,3 +128,4 @@ signing {
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign(publishing.publications)
}

0 comments on commit a1122f1

Please sign in to comment.