Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 committed Feb 28, 2024
1 parent cb242e7 commit b805bf1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=1.2.6-SNAPSHOT
version=1.2.3-SNAPSHOT
org.gradle.caching=true
org.gradle.parallel=true
10 changes: 6 additions & 4 deletions sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.attributes.DocsType.JAVADOC
import org.gradle.api.logging.Logging
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
Expand Down Expand Up @@ -221,10 +220,13 @@ class SonatypePlugin : Plugin<Project> {
apply(plugin = "signing")
apply(plugin = "org.gradle.maven-publish")

project.plugins.matching { it is JavaPlugin }.all {
project.tasks.matching { it.name == "dokka" }.all {
// Java and Dokka plugins might not have been applied yet
project.afterEvaluate {
tasks.findByName("dokka")?.apply {
val javadocTask: Task = this
tasks.create<Jar>("javadocJar") {
val main: SourceSet =
the<JavaPluginExtension>().sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME)
tasks.create<Jar>(main.javadocJarTaskName) {
archiveClassifier.set(JAVADOC)
from(javadocTask)
}
Expand Down

0 comments on commit b805bf1

Please sign in to comment.