mirror of
https://github.com/jellyfin/jellyfin-sdk-kotlin.git
synced 2024-11-23 13:59:42 +00:00
Add javadoc using Dokka
This commit is contained in:
parent
50d632fcb4
commit
48423356ba
@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id("io.github.gradle-nexus.publish-plugin") version "1.0.0"
|
||||
id("io.gitlab.arturbosch.detekt").version(Dependencies.detektVersion)
|
||||
id("org.jetbrains.dokka") version "1.4.30"
|
||||
}
|
||||
|
||||
// Versioning
|
||||
@ -32,6 +33,7 @@ subprojects {
|
||||
apply<SigningPlugin>()
|
||||
apply<MavenPublishPlugin>()
|
||||
apply<io.gitlab.arturbosch.detekt.DetektPlugin>()
|
||||
apply<org.jetbrains.dokka.gradle.DokkaPlugin>()
|
||||
|
||||
// Add dependency repositories
|
||||
repositories.defaultRepositories()
|
||||
|
@ -30,8 +30,15 @@ val sourcesJar by tasks.creating(Jar::class) {
|
||||
from(sourceSets.getByName("main").allSource)
|
||||
}
|
||||
|
||||
val javadocJar by tasks.creating(Jar::class) {
|
||||
dependsOn(tasks.getByName("dokkaJavadoc"))
|
||||
archiveClassifier.set("javadoc")
|
||||
from("$buildDir/dokka/javadoc")
|
||||
}
|
||||
|
||||
publishing.publications.create<MavenPublication>("default") {
|
||||
from(components["kotlin"])
|
||||
|
||||
artifact(sourcesJar)
|
||||
artifact(javadocJar)
|
||||
}
|
||||
|
@ -2,10 +2,6 @@ plugins {
|
||||
id("kotlin")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
explicitApi()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
apiProject(":jellyfin-api")
|
||||
apiProject(":jellyfin-model")
|
||||
@ -23,14 +19,25 @@ dependencies {
|
||||
testImplementation(Dependencies.Kotlin.Test.junit)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
explicitApi()
|
||||
}
|
||||
|
||||
val sourcesJar by tasks.creating(Jar::class) {
|
||||
archiveClassifier.set("sources")
|
||||
|
||||
from(sourceSets.getByName("main").allSource)
|
||||
}
|
||||
|
||||
val javadocJar by tasks.creating(Jar::class) {
|
||||
dependsOn(tasks.getByName("dokkaJavadoc"))
|
||||
archiveClassifier.set("javadoc")
|
||||
from("$buildDir/dokka/javadoc")
|
||||
}
|
||||
|
||||
publishing.publications.create<MavenPublication>("default") {
|
||||
from(components["kotlin"])
|
||||
|
||||
artifact(sourcesJar)
|
||||
artifact(javadocJar)
|
||||
}
|
||||
|
@ -23,8 +23,15 @@ val sourcesJar by tasks.creating(Jar::class) {
|
||||
from(sourceSets.getByName("main").allSource)
|
||||
}
|
||||
|
||||
val javadocJar by tasks.creating(Jar::class) {
|
||||
dependsOn(tasks.getByName("dokkaJavadoc"))
|
||||
archiveClassifier.set("javadoc")
|
||||
from("$buildDir/dokka/javadoc")
|
||||
}
|
||||
|
||||
publishing.publications.create<MavenPublication>("default") {
|
||||
from(components["kotlin"])
|
||||
|
||||
artifact(sourcesJar)
|
||||
artifact(javadocJar)
|
||||
}
|
||||
|
@ -49,6 +49,12 @@ tasks.create<Jar>("sourcesArtifact") {
|
||||
from(android.sourceSets["main"].java.srcDirs)
|
||||
}
|
||||
|
||||
val javadocJar by tasks.creating(Jar::class) {
|
||||
dependsOn(tasks.getByName("dokkaJavadoc"))
|
||||
archiveClassifier.set("javadoc")
|
||||
from("$buildDir/dokka/javadoc")
|
||||
}
|
||||
|
||||
// Because of limitations in the android plugin
|
||||
// the publishing definition should be inside the "afterEvaluate" block
|
||||
afterEvaluate {
|
||||
@ -56,6 +62,7 @@ afterEvaluate {
|
||||
from(components["release"])
|
||||
|
||||
artifact(tasks["sourcesArtifact"])
|
||||
artifact(tasks["javadocJar"])
|
||||
|
||||
defaultPom()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user