Skip to content

Commit

Permalink
chore: add source jar to gitlab maven registry
Browse files Browse the repository at this point in the history
  • Loading branch information
RTAkland committed Aug 21, 2024
1 parent 5a2d5a3 commit 7748d63
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,20 @@ tasks.compileJava {
targetCompatibility = "11"
}

tasks.register<Jar>("sourceJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}

artifacts {
archives(tasks.named("sourceJar"))
}

publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifact(tasks["sourceJar"])
}
}

Expand Down

0 comments on commit 7748d63

Please sign in to comment.