diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-03-22 11:23:27 +0200 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2022-03-22 11:23:27 +0200 |
commit | 101a8ae016884ad05511ec7e558bad5d2d59b018 (patch) | |
tree | b0fdba87435ec85ccb1759aa1f9d316fefbb9873 | |
parent | 842694c6e1e51696d05abe7833f0c5d9ed3c436e (diff) | |
download | LibGui-101a8ae016884ad05511ec7e558bad5d2d59b018.tar.gz LibGui-101a8ae016884ad05511ec7e558bad5d2d59b018.tar.bz2 LibGui-101a8ae016884ad05511ec7e558bad5d2d59b018.zip |
Mark fabric-api-base and fabric-networking-api-v1 as modApi deps
-rw-r--r-- | build.gradle | 19 |
1 files 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}" |