mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-23 03:17:53 +01:00
Uncharted: At wit's end
- Need to publish un-remapped sources for forge/mojmap based projects
This commit is contained in:
parent
40bd90b640
commit
99d976fb59
6 changed files with 18 additions and 10 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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")}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue