Skip to content

Commit

Permalink
Fix downgrading libraries (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
coehlrich authored Aug 28, 2024
1 parent 4f8be00 commit b32c6f0
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,17 @@ public void runtime(final String neoFormVersion, Directory patches, Directory re
launcherProfile.getArguments().set(arguments);
});

final Configuration installerRuntimeLibrariesConfiguration = ConfigurationUtils.temporaryUnhandledConfiguration(
project.getConfigurations(),
"InstallerRuntimeLibraries"
);
installerRuntimeLibrariesConfiguration.extendsFrom(installerConfiguration);
installerRuntimeLibrariesConfiguration.shouldResolveConsistentlyWith(runtimeClasspath);

final ListProperty<URI> repoCollection = new RepositoryCollection(project.getProviders(), project.getObjects(), project.getRepositories()).getURLs();
final TaskProvider<CreateLauncherJson> createLauncherJson = project.getTasks().register("createLauncherJson", CreateLauncherJson.class, task -> {
task.getProfile().set(launcherProfile);
task.getLibraries().from(installerConfiguration);
task.getLibraries().from(installerRuntimeLibrariesConfiguration);
task.getLibraries().from(pluginLayerLibraryConfiguration);
task.getLibraries().from(gameLayerLibraryConfiguration);
task.getLibraries().from(moduleOnlyConfiguration);
Expand Down Expand Up @@ -540,7 +547,7 @@ public void runtime(final String neoFormVersion, Directory patches, Directory re

final TaskProvider<CreateClasspathFiles> createWindowsServerArgsFile = project.getTasks().register("createWindowsServerArgsFile", CreateClasspathFiles.class, task -> {
task.getModulePath().from(moduleOnlyConfiguration);
task.getClasspath().from(installerConfiguration);
task.getClasspath().from(installerRuntimeLibrariesConfiguration);
task.getClasspath().from(gameLayerLibraryConfiguration);
task.getClasspath().from(pluginLayerLibraryConfiguration);
task.getPathSeparator().set(";");
Expand All @@ -554,7 +561,7 @@ public void runtime(final String neoFormVersion, Directory patches, Directory re

final TaskProvider<CreateClasspathFiles> createUnixServerArgsFile = project.getTasks().register("createUnixServerArgsFile", CreateClasspathFiles.class, task -> {
task.getModulePath().from(moduleOnlyConfiguration);
task.getClasspath().from(installerConfiguration);
task.getClasspath().from(installerRuntimeLibrariesConfiguration);
task.getClasspath().from(gameLayerLibraryConfiguration);
task.getClasspath().from(pluginLayerLibraryConfiguration);
task.getPathSeparator().set(":");
Expand Down

0 comments on commit b32c6f0

Please sign in to comment.