From 15224ec2f9ec7b1c9be73b3ca5b18c80e0e14c1f Mon Sep 17 00:00:00 2001 From: Space Walker Date: Fri, 5 Apr 2024 20:06:11 +0200 Subject: [PATCH] change 'build' parameter from int to string --- src/main/java/net/ornithemc/ploceus/Constants.java | 8 ++++---- .../ornithemc/ploceus/PloceusGradleExtension.java | 14 +++++++------- .../ploceus/api/PloceusGradleExtensionApi.java | 14 +++++++------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/main/java/net/ornithemc/ploceus/Constants.java b/src/main/java/net/ornithemc/ploceus/Constants.java index e448063..fd5bec4 100644 --- a/src/main/java/net/ornithemc/ploceus/Constants.java +++ b/src/main/java/net/ornithemc/ploceus/Constants.java @@ -37,23 +37,23 @@ public static String calamusGen2Url(int generation) { public static final String FEATHER_MAVEN_GROUP = "net.ornithemc"; public static final String FEATHER_GEN1_MAPPINGS = FEATHER_MAVEN_GROUP + ":feather:%s%s+build.%s"; - public static String featherGen1Mappings(String mc, GameSide side, int build) { + public static String featherGen1Mappings(String mc, GameSide side, String build) { return String.format(FEATHER_GEN1_MAPPINGS, mc, side.suffix(), build); } public static final String FEATHER_GEN2_MAPPINGS = FEATHER_MAVEN_GROUP + ":feather-gen%s:%s+build.%s"; - public static String featherGen2Mappings(int generation, String mc, int build) { + public static String featherGen2Mappings(int generation, String mc, String build) { return String.format(FEATHER_GEN2_MAPPINGS, generation, mc, build); } public static final String NESTS_MAVEN_GROUP = "net.ornithemc"; public static final String NESTS = NESTS_MAVEN_GROUP + ":nests:%s%s+build.%s"; - public static String nests(String mc, GameSide side, int build) { + public static String nests(String mc, GameSide side, String build) { return String.format(NESTS, mc, side.suffix(), build); } public static final String SPARROW_MAVEN_GROUP = "net.ornithemc"; public static final String SPARROW = SPARROW_MAVEN_GROUP + ":sparrow:%s%s+build.%s"; - public static String sparrow(String mc, GameSide side, int build) { + public static String sparrow(String mc, GameSide side, String build) { return String.format(SPARROW, mc, side.suffix(), build); } diff --git a/src/main/java/net/ornithemc/ploceus/PloceusGradleExtension.java b/src/main/java/net/ornithemc/ploceus/PloceusGradleExtension.java index bcc8e59..20bb0e2 100644 --- a/src/main/java/net/ornithemc/ploceus/PloceusGradleExtension.java +++ b/src/main/java/net/ornithemc/ploceus/PloceusGradleExtension.java @@ -140,7 +140,7 @@ public SigsProvider getSigsProvider() { } @Override - public Dependency featherMappings(int build) { + public Dependency featherMappings(String build) { return project.getDependencies().create( getGeneration().get() == 1 ? Constants.featherGen1Mappings(minecraftVersion(), side.get(), build) @@ -180,32 +180,32 @@ public McpForgeMappingsSpec mcpForgeMappings(String mc, String version) { } @Override - public Dependency nests(int build) { + public Dependency nests(String build) { return nests(build, getGeneration().get() == 1 ? side.get() : GameSide.MERGED); } @Override - public Dependency nests(int build, String side) { + public Dependency nests(String build, String side) { return nests(build, GameSide.of(side)); } @Override - public Dependency nests(int build, GameSide side) { + public Dependency nests(String build, GameSide side) { return project.getDependencies().create(Constants.nests(minecraftVersion(), side, build)); } @Override - public Dependency sparrow(int build) { + public Dependency sparrow(String build) { return sparrow(build, getGeneration().get() == 1 ? side.get() : GameSide.MERGED); } @Override - public Dependency sparrow(int build, String side) { + public Dependency sparrow(String build, String side) { return sparrow(build, GameSide.of(side)); } @Override - public Dependency sparrow(int build, GameSide side) { + public Dependency sparrow(String build, GameSide side) { return project.getDependencies().create(Constants.sparrow(minecraftVersion(), side, build)); } diff --git a/src/main/java/net/ornithemc/ploceus/api/PloceusGradleExtensionApi.java b/src/main/java/net/ornithemc/ploceus/api/PloceusGradleExtensionApi.java index 19fa571..4c4419d 100644 --- a/src/main/java/net/ornithemc/ploceus/api/PloceusGradleExtensionApi.java +++ b/src/main/java/net/ornithemc/ploceus/api/PloceusGradleExtensionApi.java @@ -7,7 +7,7 @@ public interface PloceusGradleExtensionApi { - Dependency featherMappings(int build); + Dependency featherMappings(String build); McpModernMappingsSpec mcpMappings(String channel, String build); @@ -17,17 +17,17 @@ public interface PloceusGradleExtensionApi { McpForgeMappingsSpec mcpForgeMappings(String mc, String version); - Dependency nests(int build); + Dependency nests(String build); - Dependency nests(int build, String side); + Dependency nests(String build, String side); - Dependency nests(int build, GameSide side); + Dependency nests(String build, GameSide side); - Dependency sparrow(int build); + Dependency sparrow(String build); - Dependency sparrow(int build, String side); + Dependency sparrow(String build, String side); - Dependency sparrow(int build, GameSide side); + Dependency sparrow(String build, GameSide side); void dependOsl(String version) throws Exception;