File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ subprojects {
5252 java {
5353 sourceCompatibility = JavaVersion .VERSION_1_8
5454 targetCompatibility = JavaVersion .VERSION_1_8
55- withSourcesJar()
5655 }
5756
5857 fun adjustArchiveFileName (property : Property <String >) {
@@ -64,19 +63,23 @@ subprojects {
6463 adjustArchiveFileName(archiveFileName)
6564 }
6665
67- // tasks.register("sourcesJar", Jar::class) {
68- // archiveClassifier.set("sources")
69- // adjustArchiveFileName(archiveFileName)
70- //
71- // from(sourceSets.main.get().allSource)
72- // }
66+ tasks.register(" sourcesJar" , Jar ::class ) {
67+ archiveClassifier.set(" sources" )
68+ adjustArchiveFileName(archiveFileName)
69+
70+ from(sourceSets.main.get().allSource)
71+ }
7372
7473 var publishToken = System .getenv(" PUBLISH_TOKEN" )
7574
7675 if (publishToken == null && project.hasProperty(" net.labymod.distributor.publish-token" )) {
7776 publishToken = project.property(" net.labymod.distributor.publish-token" ).toString()
7877 }
7978
79+ java {
80+ withSourcesJar()
81+ }
82+
8083 publishing {
8184 publications {
8285 create<MavenPublication >(project.name) {
You can’t perform that action at this time.
0 commit comments