Skip to content

Commit

Permalink
actually add components
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavis95 committed Mar 15, 2019
1 parent f308d0a commit e03dbcb
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ subprojects {
apply(plugin = "maven-publish")


val sourcesJar = tasks.register<Jar>("sourcesJar") {
dependsOn(JavaPlugin.CLASSES_TASK_NAME)
archiveClassifier.set("sources")
from(sourceSets.main.get().allJava)
}

val javadocJar = tasks.register<Jar>("javadocJar") {
dependsOn(JavaPlugin.JAVADOC_TASK_NAME)
archiveClassifier.set("javadoc")
from(tasks.javadoc)
}

artifacts.add("archives", sourcesJar)
artifacts.add("archives", javadocJar)

if (project.hasProperty("sonatypeUsername")) {

publishing {
Expand Down Expand Up @@ -119,20 +134,7 @@ subprojects {

}

val sourcesJar = tasks.register<Jar>("sourcesJar") {
dependsOn(JavaPlugin.CLASSES_TASK_NAME)
archiveClassifier.set("sources")
from(sourceSets.main.get().allJava)
}

val javadocJar = tasks.register<Jar>("javadocJar") {
dependsOn(JavaPlugin.JAVADOC_TASK_NAME)
archiveClassifier.set("javadoc")
from(tasks.javadoc)
}

artifacts.add("archives", sourcesJar)
artifacts.add("archives", javadocJar)


}

0 comments on commit e03dbcb

Please sign in to comment.