Skip to content

Commit

Permalink
finally publish sources jar again, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Epic committed May 20, 2023
1 parent 3ce67be commit 3183cde
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group 'me.epic'
version '1.2.6-SNAPSHOT'
version '1.2.7-SNAPSHOT'
description "Epic's Spigot Lib"

compileJava.options.encoding = "UTF-8"
Expand All @@ -18,6 +18,7 @@ jar.enabled = false
subprojects {

java {
withSourcesJar()
withJavadocJar()
}

Expand Down Expand Up @@ -75,11 +76,26 @@ shadowJar {
relocate 'com.jeff_media.morepersistentdatatypes', 'me.epic.morepersistentdatatypes'
}

tasks.register('combineSourcesJar', Jar) {
archiveClassifier.set("sources")

// Collect all source directories from submodules
def packages = subprojects.collect { project ->
project.file("src/main/java")
}

// Include the source files in the combined sources JAR
from(packages) {
include '**/*.java'
}
}

publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
publication.artifact(aggregateJavadocJar)
publication.artifact(combineSourcesJar)
}
}
repositories {
Expand Down

0 comments on commit 3183cde

Please sign in to comment.