I'm having an annoying issue when trying to have data generation in a separate sourceset, and it's blocking me from running datagen in my CI
Server/client sourcesets work wonderfully but this one is bugging out because it requires to be set to a different ID in the loom configuration:
loom {
splitEnvironmentSourceSets()
mods {
"promenade" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}
}
fabricApi {
configureDataGeneration() {
modId = "promenade-datagen" // Cannot be "promenade"
createSourceSet = true
client = true
}
}
When doing so, neither the generated IDE run configuration (on IntelliJ) or the gradlew runDatagen command run my data generation. Even if I override DataGeneratorEntrypoint#getEffectiveModId. It just does not hit the entry point.
My solution was to modify the run configuration (image 3). I set -Dfabric-api.datagen.modid to my actual mod ID. This does effectively generate all of my data to src/main/generated as I wished.
Nevertheless, I still cannot run the command and therefore cannot properly build the mod from my CI. (please note that I do not commit my generated data)