Uncharted: At wit's end

- Need to publish un-remapped sources for forge/mojmap based projects
This commit is contained in:
Jozufozu 2025-01-18 14:36:56 -06:00
parent 40bd90b640
commit 99d976fb59
6 changed files with 18 additions and 10 deletions

View file

@ -30,11 +30,19 @@ class JarTaskSet(
val remapSources: TaskProvider<RemapSourcesJarTask>
) {
fun publish(artifactId: String) {
fun publishWithRawSources(artifactId: String) {
publish(artifactId, sources)
}
fun publishWithRemappedSources(artifactId: String) {
publish(artifactId, remapSources)
}
private fun publish(artifactId: String, sourceJar: TaskProvider<out Jar>) {
project.the<PublishingExtension>().publications {
register<MavenPublication>("${name}RemapMaven") {
artifact(remapJar)
artifact(remapSources)
artifact(sourceJar)
artifact(javadocJar)
this.artifactId = artifactId
}

View file

@ -58,7 +58,7 @@ jarSets {
// For publishing.
create("api", api, lib).apply {
addToAssemble()
publish("flywheel-common-intermediary-api-${property("artifact_minecraft_version")}")
publishWithRemappedSources("flywheel-common-intermediary-api-${property("artifact_minecraft_version")}")
configureJar {
manifest {
@ -75,7 +75,7 @@ jarSets {
targetNamespace = "named"
}
publish("flywheel-common-mojmap-api-${property("artifact_minecraft_version")}")
publishWithRawSources("flywheel-common-mojmap-api-${property("artifact_minecraft_version")}")
}
}
}

View file

@ -67,12 +67,12 @@ platform {
}
jarSets {
mainSet.publish("flywheel-fabric-${project.property("artifact_minecraft_version")}")
mainSet.publishWithRemappedSources("flywheel-fabric-${project.property("artifact_minecraft_version")}")
mainSet.outgoing("flywheel")
create("api", api, lib).apply {
addToAssemble()
publish("flywheel-fabric-api-${project.property("artifact_minecraft_version")}")
publishWithRemappedSources("flywheel-fabric-api-${project.property("artifact_minecraft_version")}")
configureJar {
manifest {

View file

@ -65,12 +65,12 @@ platform {
}
jarSets {
mainSet.publish("flywheel-forge-${project.property("artifact_minecraft_version")}")
mainSet.publishWithRawSources("flywheel-forge-${project.property("artifact_minecraft_version")}")
mainSet.outgoing("flywheel")
create("api", api, lib).apply {
addToAssemble()
publish("flywheel-forge-api-${project.property("artifact_minecraft_version")}")
publishWithRawSources("flywheel-forge-api-${project.property("artifact_minecraft_version")}")
configureJar {
manifest {

View file

@ -27,7 +27,7 @@ transitiveSourceSets {
}
jarSets {
mainSet.publish("vanillin-fabric-${project.property("artifact_minecraft_version")}")
mainSet.publishWithRemappedSources("vanillin-fabric-${project.property("artifact_minecraft_version")}")
}
defaultPackageInfos {

View file

@ -27,7 +27,7 @@ transitiveSourceSets {
}
jarSets {
mainSet.publish("vanillin-forge-${project.property("artifact_minecraft_version")}")
mainSet.publishWithRawSources("vanillin-forge-${project.property("artifact_minecraft_version")}")
}
defaultPackageInfos {