Fixes refmap errors in sub-subprojects by replacing any subsequent : with a _.

This commit is contained in:
NinjaPhenix
2021-01-29 21:13:50 +00:00
parent 751509af4a
commit 20248dc805

View File

@@ -494,7 +494,7 @@ public class LoomGradleExtension {
if (isRootProject()) {
defaultRefmapName = project.getConvention().getPlugin(BasePluginConvention.class).getArchivesBaseName() + "-refmap.json";
} else {
defaultRefmapName = project.getConvention().getPlugin(BasePluginConvention.class).getArchivesBaseName() + "-" + project.getPath().replaceFirst(":", "") + "-refmap.json";
defaultRefmapName = project.getConvention().getPlugin(BasePluginConvention.class).getArchivesBaseName() + "-" + project.getPath().replaceFirst(":", "").replace(':', '_') + "-refmap.json";
}
project.getLogger().info("Could not find refmap definition, will be using default name: " + defaultRefmapName);