Skip to content

Commit

Permalink
chore: Add JavadocJar to Publications
Browse files Browse the repository at this point in the history
  • Loading branch information
wba2hi committed Nov 30, 2023
1 parent 55e64b8 commit 8d72d50
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ detekt-formatting = { group = "io.gitlab.arturbosch.detekt", name = "detekt-form
grpc-protoc-java-gen = { group = "io.grpc", name = "protoc-gen-grpc-java", version.ref = "grpc" }

[plugins]
dokka = { id = "org.jetbrains.dokka", version.ref = "kotlin" }
6 changes: 6 additions & 0 deletions kuksa-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ android {
}
}
}
publishing {
singleVariant("release") {
withJavadocJar()
withSourcesJar()
}
}
}

dependencies {
Expand Down
12 changes: 12 additions & 0 deletions vss-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ plugins {
kotlin("jvm")
`maven-publish`
publish
alias(libs.plugins.dokka)
}

group = "org.eclipse.kuksa"
Expand Down Expand Up @@ -53,3 +54,14 @@ configure<Publish_gradle.PublishPluginExtension> {
componentName = "java"
description = "Vehicle Signal Specification (VSS) Core Module of the KUKSA SDK"
}

tasks.register("javadocJar", Jar::class) {
dependsOn("dokkaHtml")
from("$buildDir/dokka/html")
archiveClassifier.set("javadoc")
}

java {
withJavadocJar() // needs to be called after tasks.register("javadocJar")
withSourcesJar()
}
12 changes: 12 additions & 0 deletions vss-processor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
plugins {
kotlin("jvm")
publish
alias(libs.plugins.dokka)
}

group = "org.eclipse.kuksa"
Expand Down Expand Up @@ -56,3 +57,14 @@ configure<Publish_gradle.PublishPluginExtension> {
componentName = "java"
description = "Vehicle Signal Specification (VSS) Code Generator for the KUKSA SDK"
}

tasks.register("javadocJar", Jar::class) {
dependsOn("dokkaHtml")
from("$buildDir/dokka/html")
archiveClassifier.set("javadoc")
}

java {
withJavadocJar() // needs to be called after tasks.register("javadocJar")
withSourcesJar()
}

0 comments on commit 8d72d50

Please sign in to comment.