Initial project isolation support (#1215)

* Enable project isolation

* Add test for COD

* Make spotless happy
This commit is contained in:
modmuss
2024-11-14 21:56:20 +00:00
committed by GitHub
parent e387514ff7
commit 1f28935221
20 changed files with 182 additions and 101 deletions

View File

@@ -119,7 +119,8 @@ public abstract class RemapTaskConfiguration implements Runnable {
final Jar jarTask = (Jar) getTasks().getByName(JavaPlugin.JAR_TASK_NAME);
configuration.getArtifacts().removeIf(artifact -> {
// if the artifact is built by the jar task, and has the same output path.
return artifact.getFile().getAbsolutePath().equals(jarTask.getArchiveFile().get().getAsFile().getAbsolutePath()) && artifact.getBuildDependencies().getDependencies(null).contains(jarTask);
return artifact.getFile().getAbsolutePath().equals(jarTask.getArchiveFile().get().getAsFile().getAbsolutePath())
&& (extension.isProjectIsolationActive() || artifact.getBuildDependencies().getDependencies(null).contains(jarTask));
});
}
});