diff --git a/sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt b/sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt index 3a038e7..9af24c5 100644 --- a/sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt +++ b/sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt @@ -224,8 +224,7 @@ class SonatypePlugin : Plugin { project.plugins.matching { it is JavaPlugin }.all { project.tasks.matching { it.name == "dokkaJavadoc" }.all { val javadocTask: Task = this - val main: SourceSet = the().sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME) - tasks.create(main.javadocJarTaskName) { + tasks.create("javadocJar") { archiveClassifier.set(JAVADOC) from(javadocTask) }