Closed Matyrobbrt closed 1 month ago
Last commit published: 68f9064ac8a25be89db6d64e0c2b2171d65b7db1.
Yeah I noticed, it's because the elements configuration always has a dependency, even if it's empty. I don't think it really matters in the end if the empty variant is published, i might just remove the "conditional" part which is basically always true.
I don't want to publish a variant for a niche feature by default, it's not great.
And what do you suggest instead?
Well, this is ugly, but I suppose it works:
elementsConfiguration.getAllDependencies().configureEach(dep -> {
// We always add a dependency containing the project's published data files
// Make sure that doesn't cause an empty variant
if (dep instanceof FileCollectionDependency fc && fc.getFiles().isEmpty()) return;
configurePublishing.run();
});
🚀 This PR has been released as ModDevGradle version 2.0.8-beta
.
Data files weren't being published as artifacts to maven