Modules use Gradle's compile configuration
YTG1234 opened this issue ยท 6 comments
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(...)
)
- Line 69 (
- Inside modules'
build.gradle
s, there is sometimes atestmodCompile
.
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
.
Eh, I don't know if modCompile still extends from compile in loom. Maybe loom has already changed it to extend implementation
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
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.
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
.
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