diff --git a/gradle.properties b/gradle.properties index cce67a6..dfb500b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,8 +2,8 @@ plugin.group=dev.galacticraft plugin.name=Mojarn plugin.id=mojarn plugin.description=Mixes official and yarn mappings for better argument names -plugin.version=0.2.0 +plugin.version=0.3.0 -loom.version=1.6.12 +loom.version=1.7.1 mapping-io.version=0.6.1 junit.version=5.10.2 diff --git a/src/main/java/dev/galacticraft/mojarn/impl/MojarnMappingsLayer.java b/src/main/java/dev/galacticraft/mojarn/impl/MojarnMappingsLayer.java index d90d699..3d174f1 100644 --- a/src/main/java/dev/galacticraft/mojarn/impl/MojarnMappingsLayer.java +++ b/src/main/java/dev/galacticraft/mojarn/impl/MojarnMappingsLayer.java @@ -60,6 +60,8 @@ public MojarnMappingsLayer(@NotNull MappingLayer intermediary, @NotNull MappingL @Override public void visit(MappingVisitor mappingVisitor) throws IOException { + long start = System.currentTimeMillis(); + this.mojang.visit(mappingVisitor); // generate a tree of official mappings @@ -231,6 +233,9 @@ public void visit(MappingVisitor mappingVisitor) throws IOException { mappingVisitor.visitEnd(); } } + + long time = System.currentTimeMillis() - start; + MojarnPlugin.LOGGER.info("Mapping layer generation took {}ms", time); } @Nullable diff --git a/src/main/java/dev/galacticraft/mojarn/impl/MojarnPlugin.java b/src/main/java/dev/galacticraft/mojarn/impl/MojarnPlugin.java index fcd7ace..110e1f4 100644 --- a/src/main/java/dev/galacticraft/mojarn/impl/MojarnPlugin.java +++ b/src/main/java/dev/galacticraft/mojarn/impl/MojarnPlugin.java @@ -26,11 +26,15 @@ import net.fabricmc.loom.api.LoomGradleExtensionAPI; import org.gradle.api.Plugin; import org.gradle.api.Project; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * The plugin. */ public final class MojarnPlugin implements Plugin { + public static final Logger LOGGER = LoggerFactory.getLogger("Mojarn"); + @Override public void apply(Project project) { project.getExtensions().create(MojarnExtension.class, "mojarn", MojarnExtensionImpl.class, project.getExtensions().getByType(LoomGradleExtensionAPI.class));