mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 13:05:27 -05:00
Update checkstyle to prevent using var expect for new instance creation.
This commit is contained in:
@@ -139,29 +139,8 @@ public final class CompileConfiguration {
|
||||
|
||||
MixinExtension mixin = LoomGradleExtension.get(project).getMixin();
|
||||
|
||||
if (!mixin.getUseLegacyMixinAp().get()) {
|
||||
return;
|
||||
}
|
||||
|
||||
mixin.init();
|
||||
|
||||
// Disable some things used by log4j via the mixin AP that prevent it from being garbage collected
|
||||
System.setProperty("log4j2.disable.jmx", "true");
|
||||
System.setProperty("log4j.shutdownHookEnabled", "false");
|
||||
System.setProperty("log4j.skipJansi", "true");
|
||||
|
||||
project.getLogger().info("Configuring compiler arguments for Java");
|
||||
|
||||
new JavaApInvoker(project).configureMixin();
|
||||
|
||||
if (project.getPluginManager().hasPlugin("scala")) {
|
||||
project.getLogger().info("Configuring compiler arguments for Scala");
|
||||
new ScalaApInvoker(project).configureMixin();
|
||||
}
|
||||
|
||||
if (project.getPluginManager().hasPlugin("org.jetbrains.kotlin.kapt")) {
|
||||
project.getLogger().info("Configuring compiler arguments for Kapt plugin");
|
||||
new KaptApInvoker(project).configureMixin();
|
||||
if (mixin.getUseLegacyMixinAp().get()) {
|
||||
setupMixinAp(project, mixin);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -171,6 +150,29 @@ public final class CompileConfiguration {
|
||||
}
|
||||
}
|
||||
|
||||
private static void setupMixinAp(Project project, MixinExtension mixin) {
|
||||
mixin.init();
|
||||
|
||||
// Disable some things used by log4j via the mixin AP that prevent it from being garbage collected
|
||||
System.setProperty("log4j2.disable.jmx", "true");
|
||||
System.setProperty("log4j.shutdownHookEnabled", "false");
|
||||
System.setProperty("log4j.skipJansi", "true");
|
||||
|
||||
project.getLogger().info("Configuring compiler arguments for Java");
|
||||
|
||||
new JavaApInvoker(project).configureMixin();
|
||||
|
||||
if (project.getPluginManager().hasPlugin("scala")) {
|
||||
project.getLogger().info("Configuring compiler arguments for Scala");
|
||||
new ScalaApInvoker(project).configureMixin();
|
||||
}
|
||||
|
||||
if (project.getPluginManager().hasPlugin("org.jetbrains.kotlin.kapt")) {
|
||||
project.getLogger().info("Configuring compiler arguments for Kapt plugin");
|
||||
new KaptApInvoker(project).configureMixin();
|
||||
}
|
||||
}
|
||||
|
||||
private static void extendsFrom(String a, String b, Project project) {
|
||||
project.getConfigurations().getByName(a, configuration -> configuration.extendsFrom(project.getConfigurations().getByName(b)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user