Skip to content

Commit a8ea8af

Browse files
author
mtctx
committed
Removed auto adding of javadoc and sources jar
1 parent d279da2 commit a8ea8af

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ plugins {
2525
}
2626

2727
group = "dev.mtctx.unipub"
28-
version = "1.0.13"
28+
version = "1.0.14"
2929

3030
repositories {
3131
mavenCentral()

src/main/kotlin/dev/mtctx/unipub/UniPub.kt

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,14 @@ class UniPub : Plugin<Project> {
6666
if (artifactInfos.isEmpty()) {
6767
if (!components.names.contains("java")) {
6868
throw GradleException(
69-
"UniPub: No 'java' component found. " +
70-
"Please apply either the 'java' or 'java-library' plugin in your build.gradle.kts, " +
71-
"or enable autoApplyJavaPlugin() in the unipub block."
69+
"""
70+
UniPub: No 'java' component found.
71+
Please apply either the 'java' or 'java-library' plugin in your build.gradle.kts,
72+
or enable autoApplyJavaPlugin() in the unipub block.""".trimIndent()
7273
)
7374
}
7475

7576
artifactInfos = mutableListOf(ArtifactInfo.Component("java"))
76-
77-
val sourcesJar = tasks.findByName("sourcesJar")
78-
if (sourcesJar != null) {
79-
artifactInfos.add(ArtifactInfo.Task(tasks.named("sourcesJar")))
80-
} else {
81-
logger.warn("UniPub: 'sourcesJar' task not found, skipping.")
82-
}
83-
84-
val javadocJar = tasks.findByName("javadocJar")
85-
if (javadocJar != null) {
86-
artifactInfos.add(ArtifactInfo.Task(tasks.named("javadocJar")))
87-
} else {
88-
logger.warn("UniPub: 'javadocJar' task not found, skipping.")
89-
}
9077
}
9178

9279
val settings = loadAndValidateSettingsFile(extension)

0 commit comments

Comments
 (0)