Skip to content

Commit

Permalink
Include Fabric Loader in common build to fix warnings
Browse files Browse the repository at this point in the history
The common project includes Sodium's Fabric API integration, which can be used on either loader. The Fabric API modules reference Fabric Loader's API classes, so we need to include it to prevent warning spam about an unknown enum constant.
  • Loading branch information
mrmangohands committed Aug 17, 2024
1 parent 2d2ee7a commit d4c8cae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ dependencies {
annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5")
compileOnly("net.fabricmc:sponge-mixin:0.13.2+mixin.0.8.5")

// Fixes warning spam about an unknown enum constant pulled in by Fabric API
modCompileOnly("net.fabricmc:fabric-loader:$FABRIC_LOADER_VERSION")

fun addDependentFabricModule(name: String) {
val module = fabricApi.module(name, FABRIC_API_VERSION)
modCompileOnly(module)
Expand Down

0 comments on commit d4c8cae

Please sign in to comment.