Add back sources collection in universal jar publishing

This commit is contained in:
Nassim Jahnke 2023-11-06 14:52:37 +10:00
parent e356a35aa7
commit ffdddeeb0a

View File

@ -19,6 +19,14 @@ tasks {
archiveFileName.set("ViaVersion-${project.version}.jar")
destinationDirectory.set(rootProject.projectDir.resolve("build/libs"))
}
sourcesJar {
rootProject.subprojects.forEach { subproject ->
if (subproject == project) return@forEach
val platformSourcesJarTask = subproject.tasks.findByName("sourcesJar") as? Jar ?: return@forEach
dependsOn(platformSourcesJarTask)
from(zipTree(platformSourcesJarTask.archiveFile))
}
}
}
val branch = rootProject.branchName()