mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-23 11:27:54 +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>
|
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 {
|
project.the<PublishingExtension>().publications {
|
||||||
register<MavenPublication>("${name}RemapMaven") {
|
register<MavenPublication>("${name}RemapMaven") {
|
||||||
artifact(remapJar)
|
artifact(remapJar)
|
||||||
artifact(remapSources)
|
artifact(sourceJar)
|
||||||
artifact(javadocJar)
|
artifact(javadocJar)
|
||||||
this.artifactId = artifactId
|
this.artifactId = artifactId
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ jarSets {
|
||||||
// For publishing.
|
// For publishing.
|
||||||
create("api", api, lib).apply {
|
create("api", api, lib).apply {
|
||||||
addToAssemble()
|
addToAssemble()
|
||||||
publish("flywheel-common-intermediary-api-${property("artifact_minecraft_version")}")
|
publishWithRemappedSources("flywheel-common-intermediary-api-${property("artifact_minecraft_version")}")
|
||||||
|
|
||||||
configureJar {
|
configureJar {
|
||||||
manifest {
|
manifest {
|
||||||
|
@ -75,7 +75,7 @@ jarSets {
|
||||||
targetNamespace = "named"
|
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 {
|
jarSets {
|
||||||
mainSet.publish("flywheel-fabric-${project.property("artifact_minecraft_version")}")
|
mainSet.publishWithRemappedSources("flywheel-fabric-${project.property("artifact_minecraft_version")}")
|
||||||
mainSet.outgoing("flywheel")
|
mainSet.outgoing("flywheel")
|
||||||
|
|
||||||
create("api", api, lib).apply {
|
create("api", api, lib).apply {
|
||||||
addToAssemble()
|
addToAssemble()
|
||||||
publish("flywheel-fabric-api-${project.property("artifact_minecraft_version")}")
|
publishWithRemappedSources("flywheel-fabric-api-${project.property("artifact_minecraft_version")}")
|
||||||
|
|
||||||
configureJar {
|
configureJar {
|
||||||
manifest {
|
manifest {
|
||||||
|
|
|
@ -65,12 +65,12 @@ platform {
|
||||||
}
|
}
|
||||||
|
|
||||||
jarSets {
|
jarSets {
|
||||||
mainSet.publish("flywheel-forge-${project.property("artifact_minecraft_version")}")
|
mainSet.publishWithRawSources("flywheel-forge-${project.property("artifact_minecraft_version")}")
|
||||||
mainSet.outgoing("flywheel")
|
mainSet.outgoing("flywheel")
|
||||||
|
|
||||||
create("api", api, lib).apply {
|
create("api", api, lib).apply {
|
||||||
addToAssemble()
|
addToAssemble()
|
||||||
publish("flywheel-forge-api-${project.property("artifact_minecraft_version")}")
|
publishWithRawSources("flywheel-forge-api-${project.property("artifact_minecraft_version")}")
|
||||||
|
|
||||||
configureJar {
|
configureJar {
|
||||||
manifest {
|
manifest {
|
||||||
|
|
|
@ -27,7 +27,7 @@ transitiveSourceSets {
|
||||||
}
|
}
|
||||||
|
|
||||||
jarSets {
|
jarSets {
|
||||||
mainSet.publish("vanillin-fabric-${project.property("artifact_minecraft_version")}")
|
mainSet.publishWithRemappedSources("vanillin-fabric-${project.property("artifact_minecraft_version")}")
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultPackageInfos {
|
defaultPackageInfos {
|
||||||
|
|
|
@ -27,7 +27,7 @@ transitiveSourceSets {
|
||||||
}
|
}
|
||||||
|
|
||||||
jarSets {
|
jarSets {
|
||||||
mainSet.publish("vanillin-forge-${project.property("artifact_minecraft_version")}")
|
mainSet.publishWithRawSources("vanillin-forge-${project.property("artifact_minecraft_version")}")
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultPackageInfos {
|
defaultPackageInfos {
|
||||||
|
|
Loading…
Reference in a new issue