|
28 | 28 |
|
29 | 29 | import javax.xml.parsers.ParserConfigurationException; |
30 | 30 | import javax.xml.transform.TransformerException; |
| 31 | + |
| 32 | +import org.jetbrains.annotations.Nullable; |
| 33 | + |
31 | 34 | import java.io.File; |
32 | 35 | import java.io.FileOutputStream; |
33 | 36 | import java.io.FileWriter; |
@@ -152,7 +155,9 @@ private List<PendingArtifact> processV3(String version, Mappings mappings, Map<S |
152 | 155 | var classesTask = new InjectTask(build, this.cache, name, patcher, recompile, mappings); |
153 | 156 |
|
154 | 157 | var extraCoords = Artifact.from(Constants.MC_GROUP, Constants.MC_CLIENT + "-extra", patcher.getMCP().getName().getVersion()); |
155 | | - var mappingCoords = mappings.getArtifact(joined); |
| 158 | + |
| 159 | + // If we are not obfuscated, don't add the csv zip as a extra artifact |
| 160 | + var mappingCoords = patcher.isObfuscated() ? mappings.getArtifact(joined) : null; |
156 | 161 |
|
157 | 162 | var mappingArtifacts = mappingArtifacts(build, mappings, joined, outputJson); |
158 | 163 |
|
@@ -270,15 +275,18 @@ private static Task metadata(File build, Patcher patcher) { |
270 | 275 | }); |
271 | 276 | } |
272 | 277 |
|
273 | | - private static Task pom(File build, Patcher patcher, String version, Artifact clientExtra, Artifact mappings) { |
| 278 | + private static Task pom(File build, Patcher patcher, String version, @Nullable Artifact clientExtra, @Nullable Artifact mappings) { |
274 | 279 | return Task.named("pom[forge]", () -> { |
275 | 280 | var output = new File(build, "forge.pom"); |
276 | 281 | var cache = Util.cache(output) |
277 | 282 | .addKnown("data", patcher.getDataHash()) |
278 | | - .addKnown("extra", Util.replace(clientExtra, Object::toString)) |
279 | | - .addKnown("mappings", Util.replace(mappings, Object::toString)) |
280 | | - .addKnown("code-version", "1") |
281 | | - ; |
| 283 | + .addKnown("code-version", "1"); |
| 284 | + |
| 285 | + if (clientExtra != null) |
| 286 | + cache.addKnown("extra", clientExtra.toString()); |
| 287 | + |
| 288 | + if (mappings != null) |
| 289 | + cache.addKnown("mappings", mappings.toString()); |
282 | 290 |
|
283 | 291 | if (Mavenizer.checkCache(output, cache)) |
284 | 292 | return output; |
|
0 commit comments