Skip to content

Commit

Permalink
fix: fix jitpack build error
Browse files Browse the repository at this point in the history
Signed-off-by: starry-shivam <starry@krsh.dev>
  • Loading branch information
starry-shivam committed Jun 19, 2024
1 parent c269469 commit a0c4921
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ kover {
}
}

val dokkaHtml by tasks.getting(org.jetbrains.dokka.gradle.DokkaTask::class)

val javadocJar: TaskProvider<Jar> by tasks.registering(Jar::class) {
dependsOn(dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaHtml.outputDirectory)
}

publishing {
publications {
register("mavenJava", MavenPublication::class) {
Expand All @@ -53,21 +61,12 @@ publishing {
}
}

// Add Dokka and Javadoc artifacts.
artifact(tasks.dokkaJavadoc.get().outputDirectory)
artifact(tasks.dokkaHtml.get().outputDirectory)
// Add Javadoc JAR to the publication.
artifact(javadocJar)
}
}
}

tasks.dokkaHtml.configure {
outputDirectory.set(buildDir.resolve("dokka"))
}

tasks.dokkaJavadoc.configure {
outputDirectory.set(buildDir.resolve("javadoc"))
}

// Print line coverage percentage to console so we can generate badge in CI.
tasks.register("printLineCoverage") {
group = "verification"
Expand Down Expand Up @@ -101,6 +100,4 @@ tasks.register("printLineCoverage") {

println("%.1f".format(coveragePercent))
}
}


}

0 comments on commit a0c4921

Please sign in to comment.