update Stitch, add CleanLoomBiaries
parent
43d3a46296
commit
c6c88e69de
|
@ -34,7 +34,7 @@ dependencies {
|
|||
implementation ('org.zeroturnaround:zt-zip:1.13')
|
||||
implementation ('com.google.code.gson:gson:2.8.5')
|
||||
implementation ('com.google.guava:guava:27.0.1-jre')
|
||||
implementation ('net.fabricmc:stitch:0.1.0.18')
|
||||
implementation ('net.fabricmc:stitch:0.1.0.24')
|
||||
implementation ('net.fabricmc:tiny-remapper:0.1.0.20') {
|
||||
transitive = false
|
||||
}
|
||||
|
|
|
@ -32,6 +32,8 @@ public class LoomGradlePlugin extends AbstractPlugin {
|
|||
public void apply(Project target) {
|
||||
super.apply(target);
|
||||
|
||||
makeTask("cleanLoomBinaries", CleanLoomBinaries.class);
|
||||
|
||||
makeTask("remapJar", RemapJar.class);
|
||||
|
||||
makeTask("genSources", GenSourcesTask.class);
|
||||
|
|
|
@ -59,6 +59,7 @@ public class MinecraftJarProvider {
|
|||
FileOutputStream merged = new FileOutputStream(MINECRAFT_MERGED_JAR);
|
||||
|
||||
JarMerger jarMerger = new JarMerger(client, server, merged);
|
||||
jarMerger.enableSyntheticParamsOffset();
|
||||
|
||||
jarMerger.merge();
|
||||
jarMerger.close();
|
||||
|
@ -70,11 +71,10 @@ public class MinecraftJarProvider {
|
|||
|
||||
private void initFiles(Project project, MinecraftProvider minecraftProvider) {
|
||||
LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class);
|
||||
PomfProvider pomfProvider = extension.getPomfProvider();
|
||||
MINECRAFT_MERGED_JAR = new File(extension.getUserCache(), "minecraft-" + minecraftProvider.minecraftVersion + "-merged.jar");
|
||||
}
|
||||
|
||||
public File getInputJar() {
|
||||
public File getMergedJar() {
|
||||
return MINECRAFT_MERGED_JAR;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* This file is part of fabric-loom, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) 2016, 2017, 2018 FabricMC
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
package net.fabricmc.loom.task;
|
||||
|
||||
import net.fabricmc.loom.LoomGradleExtension;
|
||||
import org.gradle.api.DefaultTask;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
|
||||
public class CleanLoomBinaries extends DefaultTask {
|
||||
@TaskAction
|
||||
public void run() {
|
||||
Project project = this.getProject();
|
||||
LoomGradleExtension extension = project.getExtensions().getByType(LoomGradleExtension.class);
|
||||
extension.getMinecraftProvider().jarProvider.getMergedJar().delete();
|
||||
extension.getMinecraftMappedProvider().getIntermediaryJar().delete();
|
||||
extension.getMinecraftMappedProvider().getMappedJar().delete();
|
||||
}
|
||||
}
|
|
@ -52,7 +52,7 @@ public class MapJarsTiny {
|
|||
.map(File::toPath)
|
||||
.toArray(Path[]::new);
|
||||
|
||||
Path input = jarProvider.getInputJar().toPath();
|
||||
Path input = jarProvider.getMergedJar().toPath();
|
||||
Path outputMapped = mapProvider.getMappedJar().toPath();
|
||||
Path outputIntermediary = mapProvider.getIntermediaryJar().toPath();
|
||||
|
||||
|
|
Loading…
Reference in New Issue