diff --git a/src/main/java/net/fabricmc/loom/configuration/FabricApiExtension.java b/src/main/java/net/fabricmc/loom/configuration/FabricApiExtension.java index fb2027278..702a535b5 100644 --- a/src/main/java/net/fabricmc/loom/configuration/FabricApiExtension.java +++ b/src/main/java/net/fabricmc/loom/configuration/FabricApiExtension.java @@ -159,6 +159,8 @@ public void configureDataGeneration(Action action) { // Create a classpath group for this mod. Assume that the main sourceset is already in a group. mod.sourceSet(DATAGEN_SOURCESET_NAME); }); + + extension.createRemapConfigurations(sourceSets.getByName(DATAGEN_SOURCESET_NAME)); } if (settings.getCreateRunConfiguration().get()) { diff --git a/src/test/groovy/net/fabricmc/loom/test/integration/DataGenerationTest.groovy b/src/test/groovy/net/fabricmc/loom/test/integration/DataGenerationTest.groovy index a5fb4a333..778b66119 100644 --- a/src/test/groovy/net/fabricmc/loom/test/integration/DataGenerationTest.groovy +++ b/src/test/groovy/net/fabricmc/loom/test/integration/DataGenerationTest.groovy @@ -85,6 +85,8 @@ class DataGenerationTest extends Specification implements GradleProjectTestTrait mappings "net.fabricmc:yarn:1.20.2+build.4:v2" modImplementation "net.fabricmc:fabric-loader:0.14.23" modImplementation "net.fabricmc.fabric-api:fabric-api:0.90.0+1.20.2" + + modDatagenImplementation fabricApi.module("fabric-data-generation-api-v1", "0.90.0+1.20.2") } ''' when: