From 101a8ae016884ad05511ec7e558bad5d2d59b018 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Tue, 22 Mar 2022 11:23:27 +0200 Subject: Mark fabric-api-base and fabric-networking-api-v1 as modApi deps --- build.gradle | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 26d2e4a..2eed564 100644 --- a/build.gradle +++ b/build.gradle @@ -32,14 +32,21 @@ dependencies { mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + // True: module classes are used in public API classes/methods/fields def fabricApiModules = [ - 'fabric-api-base', - 'fabric-lifecycle-events-v1', - 'fabric-networking-api-v1', - 'fabric-rendering-v1', + 'fabric-api-base': true, + 'fabric-lifecycle-events-v1': false, + 'fabric-networking-api-v1': true, + 'fabric-rendering-v1': false, ] - for (def module : fabricApiModules) { - modImplementation fabricApi.module(module, project.fabric_version) + fabricApiModules.forEach { module, api -> + def dependency = fabricApi.module(module, project.fabric_version) + + if (api) { + modApi dependency + } else { + modImplementation dependency + } } modImplementation "io.github.cottonmc:Jankson-Fabric:${project.jankson_version}" -- cgit