Fabric API

Fabric API

106M Downloads

Modules use Gradle's compile configuration

YTG1234 opened this issue ยท 6 comments

commented

The Problem

Gradle's compile dependency configuration has long been deprecated, but all of the modules in Fabric API still use it.

Quoting the Gradle documentation, compile is

Superseded by implementation.

Where?

  • build.gradle:
    • Line 69 (compile it)
    • Line 126 (modCompile "net.fabricmc:fabric-loader:${Globals.loaderVersion}")
    • Line 236 (testmodCompile sourceSets.main.output)
    • Lines 330 and 333 (compile project(...))
  • Inside modules' build.gradles, there is sometimes a testmodCompile.

Why Did I Open This Issue?

compile should generally never be used, and implementation should be used instead. If we need dependencies to be on the compile classpath of consumers, use api.

commented

Eh, I don't know if modCompile still extends from compile in loom. Maybe loom has already changed it to extend implementation

commented

Also this probably will be fixed as a side product of updating to like gradle 7. Heard gradle is trying to remove compile in like some new version

commented

Also this probably will be fixed as a side product of updating to like gradle 7. Heard gradle is trying to remove compile in like some new version

Yeah, compile will be removed in Gradle 7.

commented

Eh, I don't know if modCompile still extends from compile in loom. Maybe loom has already changed it to extend implementation

Then why does modCompile exist at all? Regardless, FAPI uses modCompile as well as the regular compile.

commented

modCompile stuff is part of loom, so can't help here. But if you want to fix gradle 7 compatibility (more than just switching off compile) feel free to open a pull request

commented

Think the update has been done.