Skip to content

Commit

Permalink
Yeet ignoreList regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Nov 30, 2023
1 parent 9da8a2e commit ca2e41d
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -747,12 +747,7 @@ private static void configureInstallerTokens(final TokenizedTask tokenizedTask,
tokenizedTask.token("MC_VERSION", runtimeDefinition.getSpecification().getMinecraftVersion());
tokenizedTask.token("MCP_VERSION", runtimeDefinition.getJoinedNeoFormRuntimeDefinition().getSpecification().getNeoFormVersion());
tokenizedTask.token("FORGE_GROUP", tokenizedTask.getProject().getGroup());
tokenizedTask.token("IGNORE_LIST", ignoreConfigurations.stream().flatMap(config -> config.getFiles().stream()).map(file -> {
if (file.getName().startsWith("events") || file.getName().startsWith("core")) {
return file.getName();
}
return file.getName().replaceAll("([-_]([.\\d]*\\d+)|\\.jar$)", "");
}).collect(Collectors.joining(",")));
tokenizedTask.token("IGNORE_LIST", ignoreConfigurations.stream().flatMap(config -> config.getFiles().stream()).map(File::getName).collect(Collectors.joining(",")));
tokenizedTask.token("PLUGIN_LAYER_LIBRARIES", pluginLayerLibraries.getFiles().stream().map(File::getName).collect(Collectors.joining(",")));
tokenizedTask.token("GAME_LAYER_LIBRARIES", gameLayerLibraries.getFiles().stream().map(File::getName).collect(Collectors.joining(",")));
tokenizedTask.token("MODULES", "ALL-MODULE-PATH");
Expand All @@ -767,7 +762,7 @@ private static Provider<String> createIgnoreList(Configuration moduleOnlyConfigu
return project.provider(() -> {
StringBuilder ignoreList = new StringBuilder(1000);
for (Configuration cfg : Arrays.asList(moduleOnlyConfiguration, gameLayerLibraryConfiguration, pluginLayerLibraryConfiguration)) {
ignoreList.append(cfg.getFiles().stream().map(file -> (file.getName().startsWith("events") || file.getName().startsWith("core") ? file.getName() : file.getName().replaceAll("([-_]([.\\d]*\\d+)|\\.jar$)", ""))).collect(Collectors.joining(","))).append(",");
ignoreList.append(cfg.getFiles().stream().map(File::getName).collect(Collectors.joining(","))).append(",");
}
ignoreList.append("client-extra").append(",").append(project.getName()).append("-");
return ignoreList.toString();
Expand Down

0 comments on commit ca2e41d

Please sign in to comment.