Skip to content

Commit

Permalink
Include javadoc for sonatype
Browse files Browse the repository at this point in the history
Looks like this was no longer included as core module transitioned to a jvm only module
  • Loading branch information
DanielMartinus committed Dec 29, 2023
1 parent 1cef701 commit 5a4ba38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("org.jetbrains.dokka") version "1.7.0"
}

buildscript {
Expand All @@ -14,6 +15,7 @@ buildscript {
classpath("com.github.dcendents:android-maven-gradle-plugin:2.1")
classpath("com.diffplug.spotless:spotless-plugin-gradle:5.14.2")
classpath("io.github.gradle-nexus:publish-plugin:1.3.0")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.7.0")
}
}

Expand Down
11 changes: 11 additions & 0 deletions scripts/publish-module.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply(plugin = "maven-publish")
apply(plugin = "signing")
apply(plugin = "org.jetbrains.dokka")

val PLUGIN_ANDROID_LIBRARY = "com.android.library"
val PUBLICATION_NAME = "release"
Expand All @@ -20,6 +21,15 @@ val sourcesJar by tasks.registering(Jar::class) {
}
}

val javadocJar by tasks.registering(Jar::class) {
archiveClassifier.set("javadoc")

val dokkaJavadocTask = tasks.getByName("dokkaJavadoc")

from(dokkaJavadocTask)
dependsOn(dokkaJavadocTask)
}

val group = NexusConfig.PUBLISH_GROUP_ID
val version = NexusConfig.PUBLISH_VERSION

Expand All @@ -41,6 +51,7 @@ afterEvaluate {
}

artifact(sourcesJar.get())
artifact(javadocJar.get())

// Mostly self-explanatory metadata
pom {
Expand Down

0 comments on commit 5a4ba38

Please sign in to comment.