mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 12:10:30 +00:00
Fix several issues with the Fabric API jar
- Bundle the core API inside the Fabric API jar for now, to ensure that ResourceLocation is remapped. - Add a dummy fabric.mod.json file to the API. We'll remove this once https://github.com/FabricMC/fabric-loom/pull/749 is released.
This commit is contained in:
parent
8d2e150f05
commit
b58b9b7df3
@ -1,3 +1,5 @@
|
|||||||
|
import cc.tweaked.gradle.mavenDependencies
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("cc-tweaked.fabric")
|
id("cc-tweaked.fabric")
|
||||||
id("cc-tweaked.publishing")
|
id("cc-tweaked.publishing")
|
||||||
@ -15,3 +17,30 @@ dependencies {
|
|||||||
api(project(":core-api"))
|
api(project(":core-api"))
|
||||||
compileOnly(project(":forge-stubs"))
|
compileOnly(project(":forge-stubs"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.jar {
|
||||||
|
manifest {
|
||||||
|
attributes["Fabric-Loom-Remap"] = "true"
|
||||||
|
}
|
||||||
|
|
||||||
|
from(project(":core-api").sourceSets.main.get().output) // TODO(1.19.3): Remove when we've fixed GenericSource
|
||||||
|
from("src/main/modJson") // TODO: Remove once Loom 1.1 is out.
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO(1.19.3): Remove when GenericSource no longer uses ResourceLocation. This forces us to bundle the core API with
|
||||||
|
// the Fabric API, in order to remap those classes.
|
||||||
|
|
||||||
|
tasks.sourcesJar {
|
||||||
|
from(project(":core-api").sourceSets.main.get().allJava)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(GenerateModuleMetadata::class).configureEach { isEnabled = false }
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
named("maven", MavenPublication::class) {
|
||||||
|
mavenDependencies {
|
||||||
|
exclude(dependencies.create("cc.tweaked:"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
9
projects/fabric-api/src/main/modJson/fabric.mod.json
Normal file
9
projects/fabric-api/src/main/modJson/fabric.mod.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"schemaVersion": 1,
|
||||||
|
"id": "computercraft_api_stub",
|
||||||
|
"version": "1.0",
|
||||||
|
"name": "ComputerCraft API",
|
||||||
|
"description": "A placeholder mod to ensure Loom deobfuscates the API jar.",
|
||||||
|
"license": "ComputerCraft Public License (https://raw.githubusercontent.com/dan200/ComputerCraft/master/LICENSE)",
|
||||||
|
"environment": "*"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user