mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 21:05:58 -05:00
Fix client only sources missing from sources jar registered after enabling split sourcesets.
This commit is contained in:
@@ -209,13 +209,15 @@ public abstract sealed class MinecraftSourceSets permits MinecraftSourceSets.Sin
|
||||
);
|
||||
});
|
||||
|
||||
if (project.getTasks().findByName(mainSourceSet.getSourcesJarTaskName()) == null) {
|
||||
// No sources.
|
||||
return;
|
||||
}
|
||||
// The sources task can be registered at a later time.
|
||||
project.getTasks().withType(Jar.class, sources -> {
|
||||
if (!mainSourceSet.getSourcesJarTaskName().equals(sources.getName())) {
|
||||
// Not the sources task we are looking for.
|
||||
return;
|
||||
}
|
||||
|
||||
project.getTasks().named(mainSourceSet.getSourcesJarTaskName(), Jar.class).configure(jar -> {
|
||||
jar.from(clientOnlySourceSet.getAllSource());
|
||||
// The client only sources to the combined sources jar.
|
||||
sources.from(clientOnlySourceSet.getAllSource());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user