mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 13:37:45 -05:00
Remove a bunch of stuff + update to support modlauncher
This commit is contained in:
@@ -87,36 +87,6 @@ public class AbstractPlugin implements Plugin<Project> {
|
||||
configureIDEs();
|
||||
configureCompile();
|
||||
|
||||
Map<Project, Set<Task>> taskMap = project.getAllTasks(true);
|
||||
for (Map.Entry<Project, Set<Task>> entry : taskMap.entrySet()) {
|
||||
Project project = entry.getKey();
|
||||
Set<Task> taskSet = entry.getValue();
|
||||
for (Task task : taskSet) {
|
||||
if (task instanceof JavaCompile
|
||||
&& !(task.getName().contains("Test")) && !(task.getName().contains("test"))) {
|
||||
JavaCompile javaCompileTask = (JavaCompile) task;
|
||||
javaCompileTask.doFirst(task1 -> {
|
||||
project.getLogger().lifecycle(":setting java compiler args");
|
||||
try {
|
||||
javaCompileTask.getClasspath().add(target.files(this.getClass().getProtectionDomain().getCodeSource().getLocation()));
|
||||
|
||||
javaCompileTask.getOptions().getCompilerArgs().add("-AinMapFilePomfMojang=" + Constants.MAPPINGS_TINY.get(extension).getCanonicalPath());
|
||||
javaCompileTask.getOptions().getCompilerArgs().add("-AoutMapFilePomfMojang=" + Constants.MAPPINGS_MIXIN_EXPORT.get(extension).getCanonicalPath());
|
||||
if(extension.refmapName == null || extension.refmapName.isEmpty()){
|
||||
project.getLogger().error("Could not find refmap definition, will be using default name: " + project.getName() + "-refmap.json");
|
||||
extension.refmapName = project.getName() + "-refmap.json";
|
||||
}
|
||||
javaCompileTask.getOptions().getCompilerArgs().add("-AoutRefMapFile=" + new File(javaCompileTask.getDestinationDir(), extension.refmapName).getCanonicalPath());
|
||||
javaCompileTask.getOptions().getCompilerArgs().add("-AdefaultObfuscationEnv=pomf:mojang");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -217,11 +187,6 @@ public class AbstractPlugin implements Plugin<Project> {
|
||||
mavenArtifactRepository.setUrl("https://maven.modmuss50.me");
|
||||
});
|
||||
|
||||
project1.getRepositories().maven(mavenArtifactRepository -> {
|
||||
mavenArtifactRepository.setName("SpongePowered");
|
||||
mavenArtifactRepository.setUrl("http://repo.spongepowered.org/maven");
|
||||
});
|
||||
|
||||
project1.getRepositories().maven(mavenArtifactRepository -> {
|
||||
mavenArtifactRepository.setName("Mojang");
|
||||
mavenArtifactRepository.setUrl("https://libraries.minecraft.net/");
|
||||
@@ -250,7 +215,7 @@ public class AbstractPlugin implements Plugin<Project> {
|
||||
|
||||
if (extension.omlVersion != null && !extension.omlVersion.isEmpty()) {
|
||||
//only add this when not in a fabric dev env
|
||||
project1.getDependencies().add(Constants.COMPILE_MODS, "OpenModLoader:OpenModLoader:" + extension.version + "-" + extension.omlVersion);
|
||||
project1.getDependencies().add(Constants.CONFIG_MC_DEPENDENCIES, "OpenModLoader:OpenModLoader:" + extension.version + "-" + extension.omlVersion);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user