Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Nov 26, 2024
1 parent 9577b9d commit 0af4dbd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions buildSrc/src/main/java/net/neoforged/neodev/NeoDevPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -423,14 +423,15 @@ public void apply(Project project) {
});

// Set up E2E testing of the produced installer
setupEndToEndTesting(
setupProductionClientTest(
project,
configurations,
downloadAssets,
installerJar,
minecraftVersion,
neoForgeVersion
);
setupProductionServerTest(project, installerJar);
}

private static TaskProvider<ApplyAccessTransformer> configureAccessTransformer(
Expand Down Expand Up @@ -556,7 +557,7 @@ static TaskProvider<CreateMinecraftArtifacts> configureMinecraftDecompilation(Pr
});
}

private void setupEndToEndTesting(Project project,
private void setupProductionClientTest(Project project,
NeoDevConfigurations configurations,
TaskProvider<? extends DownloadAssets> downloadAssets,
TaskProvider<? extends AbstractArchiveTask> installer,
Expand Down Expand Up @@ -590,7 +591,9 @@ private void setupEndToEndTesting(Project project,
task.setDescription("Tests the production client installed by installProductionClient.");
configureRunProductionClient.accept(task);
});
}

private void setupProductionServerTest(Project project, TaskProvider<? extends AbstractArchiveTask> installer) {
var installServer = project.getTasks().register("installProductionServer", InstallProductionServer.class, task -> {
task.setGroup(INTERNAL_GROUP);
task.setDescription("Runs the installer produced by this build and installs a production server.");
Expand Down

0 comments on commit 0af4dbd

Please sign in to comment.