diff --git a/build.gradle.kts b/build.gradle.kts index e9b4cdf18..63ffabbd7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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("purge") { dependsOn("clean") workingDir = layout.projectDirectory.dir("vclib").asFile diff --git a/conventions-vclib/gradle-conventions-plugin b/conventions-vclib/gradle-conventions-plugin index 812c4b534..200f3eea6 160000 --- a/conventions-vclib/gradle-conventions-plugin +++ b/conventions-vclib/gradle-conventions-plugin @@ -1 +1 @@ -Subproject commit 812c4b534fcc281957aefe196d9d85eabdce3409 +Subproject commit 200f3eea6e875cb52f096a7e60fa0bad8e33feed diff --git a/gradle.properties b/gradle.properties index b7378a650..c1bb9d53c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/vclib-aries/build.gradle.kts b/vclib-aries/build.gradle.kts index 80f9807ce..dd6a72f0b 100644 --- a/vclib-aries/build.gradle.kts +++ b/vclib-aries/build.gradle.kts @@ -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") @@ -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("deleteDokkaOutputDirectory") { - delete(dokkaOutputDir) -} -val javadocJar = tasks.register("javadocJar") { - dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml) - archiveClassifier.set("javadoc") - from(dokkaOutputDir) -} - -val signingTasks: TaskCollection = tasks.withType() -tasks.withType().configureEach { - mustRunAfter(signingTasks) -} - exportIosFramework("VcLibAriesKmm", *commonIosExports(), project(":vclib")) kotlin { @@ -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 { diff --git a/vclib-openid/build.gradle.kts b/vclib-openid/build.gradle.kts index 18168033c..aa7689c13 100644 --- a/vclib-openid/build.gradle.kts +++ b/vclib-openid/build.gradle.kts @@ -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") @@ -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("deleteDokkaOutputDirectory") { - delete(dokkaOutputDir) -} -val javadocJar = tasks.register("javadocJar") { - dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml) - archiveClassifier.set("javadoc") - from(dokkaOutputDir) -} - -val signingTasks: TaskCollection = tasks.withType() -tasks.withType().configureEach { - mustRunAfter(signingTasks) -} - exportIosFramework("VcLibOpenIdKmm", *commonIosExports(), project(":vclib")) kotlin { @@ -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 { @@ -122,3 +99,4 @@ signing { useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) sign(publishing.publications) } + diff --git a/vclib/build.gradle.kts b/vclib/build.gradle.kts index 0c163fd93..32008f55e 100644 --- a/vclib/build.gradle.kts +++ b/vclib/build.gradle.kts @@ -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("deleteDokkaOutputDirectory") { - delete(dokkaOutputDir) -} -val javadocJar = tasks.register("javadocJar") { - dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml) - archiveClassifier.set("javadoc") - from(dokkaOutputDir) -} - -val signingTasks: TaskCollection = tasks.withType() -tasks.withType().configureEach { - mustRunAfter(signingTasks) -} - exportIosFramework("VcLibKmm", *commonIosExports()) kotlin { @@ -68,7 +49,6 @@ kotlin { } - val commonTest by getting val iosMain by getting @@ -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 { @@ -147,3 +128,4 @@ signing { useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword) sign(publishing.publications) } +