Skip to content

Commit

Permalink
chore: target loom 1.7
Browse files Browse the repository at this point in the history
time how long mapping generation takes
  • Loading branch information
marcus8448 committed Jun 22, 2024
1 parent 4b13f2a commit 2a55392
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/dev/galacticraft/mojarn/impl/MojarnPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Project> {
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));
Expand Down

0 comments on commit 2a55392

Please sign in to comment.