Skip to content

Commit

Permalink
move dokka block
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMcCloud committed Aug 16, 2023
1 parent ba0cd50 commit c6202cd
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 50 deletions.
33 changes: 16 additions & 17 deletions vclib-aries/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,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)
}



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

Expand Down Expand Up @@ -68,6 +51,22 @@ repositories {
}


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)
}


publishing {
publications {
withType<MavenPublication> {
Expand Down
27 changes: 12 additions & 15 deletions vclib-openid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,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)
}

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

Expand Down Expand Up @@ -65,6 +50,18 @@ repositories {
mavenCentral()
}

val dokkaOutputDir = "$buildDir/dokka"
tasks.dokkaHtml {
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)
}

publishing {
publications {
Expand Down
39 changes: 21 additions & 18 deletions vclib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +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)
}




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

Expand Down Expand Up @@ -91,6 +74,20 @@ repositories {
}


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)
}

publishing {
publications {
withType<MavenPublication> {
Expand Down Expand Up @@ -149,4 +146,10 @@ val signTasks = tasks.filter { it.name.startsWith("sign") }
tasks.filter { it.name.startsWith("publish") }.forEach {
println("DEP: ${it.name} now depends on ${signTasks.joinToString { it.name }}")
it.dependsOn(*signTasks.toTypedArray())
}
}

tasks.dokkaHtml {
val transform = tasks.filter { it.name.startsWith("transform") }
println("adding dokkaHTML dependency to " + transform.joinToString { it.name })
dependsOn(*transform.toTypedArray())
}

0 comments on commit c6202cd

Please sign in to comment.