mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 05:27:43 -05:00
General cleanup by making use of java 16 features (#397)
* General cleanup by making use of java 16 features * use jackson-databind in place of gson when reading to a record * Fixes * cleanup * dep updates * Replace commons IOUtils usage with native java * Update fernflower
This commit is contained in:
@@ -30,13 +30,11 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
|
||||
import net.fabricmc.loom.LoomGradleExtension;
|
||||
import net.fabricmc.loom.LoomGradlePlugin;
|
||||
import net.fabricmc.loom.configuration.ide.RunConfig;
|
||||
import net.fabricmc.loom.configuration.ide.RunConfigSettings;
|
||||
|
||||
@@ -48,7 +46,6 @@ public class GenVsCodeProjectTask extends AbstractLoomTask {
|
||||
@TaskAction
|
||||
public void genRuns() {
|
||||
Project project = getProject();
|
||||
LoomGradleExtension extension = getExtension();
|
||||
File projectDir = project.file(".vscode");
|
||||
|
||||
if (!projectDir.exists()) {
|
||||
@@ -72,8 +69,7 @@ public class GenVsCodeProjectTask extends AbstractLoomTask {
|
||||
settings.makeRunDir();
|
||||
}
|
||||
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
String json = gson.toJson(launch);
|
||||
String json = LoomGradlePlugin.GSON.toJson(launch);
|
||||
|
||||
try {
|
||||
FileUtils.writeStringToFile(launchJson, json, StandardCharsets.UTF_8);
|
||||
|
||||
Reference in New Issue
Block a user