Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
sonatype apparently now requires source, hopefully this provides
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Dec 2, 2023
1 parent 00fca3c commit 190c28f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ val javadocJarStub by tasks.creating(Jar::class) {
archiveClassifier.set("javadoc")
}

val sourcesJar by tasks.registering(Jar::class) {
archiveClassifier.set("sources")
// Accessing sourceSets within the Java plugin's scope
project.plugins.withType<JavaPlugin>().configureEach {
from(project.the<JavaPluginExtension>().sourceSets["main"].allSource)
}
}

publishing {
publications.withType<MavenPublication>().configureEach {
Expand All @@ -42,6 +49,10 @@ publishing {

artifact(javadocJarStub)

// Added 2023-12-02 to fix "Missing: no sources jar found in folder
// '/io/kweb/kweb-core/1.4.9'" encountered when publishing to Maven Central
artifact(sourcesJar)

// apply default configs for all Maven publications
pom {
name.set("Kweb")
Expand Down

0 comments on commit 190c28f

Please sign in to comment.