diff options
author | Maximusbarcz <maxim.baranek@gmail.com> | 2022-12-23 11:21:43 +0100 |
---|---|---|
committer | Maximusbarcz <maxim.baranek@gmail.com> | 2022-12-23 11:21:43 +0100 |
commit | ca23a48ec1efa4ebcc578c8dc876a0e8794a885b (patch) | |
tree | 27cb974955507c6e8045e02fc16220a0c2e68da5 | |
parent | 0ee42bcccddbd5c6223e87cf3eb49fd67219c51b (diff) | |
download | ygasi-ca23a48ec1efa4ebcc578c8dc876a0e8794a885b.tar.gz ygasi-ca23a48ec1efa4ebcc578c8dc876a0e8794a885b.tar.bz2 ygasi-ca23a48ec1efa4ebcc578c8dc876a0e8794a885b.zip |
Added DataGen to the build.gradle
-rw-r--r-- | build.gradle | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle index 027b631..3408d94 100644 --- a/build.gradle +++ b/build.gradle @@ -84,3 +84,32 @@ publishing { // retrieving dependencies. } } + +loom { + runs { + // + // This adds a new gradle task that runs the datagen API: "gradlew runDatagenClient" + // + datagenClient { + inherit client + name "Data Generation" + vmArg "-Dfabric-api.datagen" + vmArg "-Dfabric-api.datagen.output-dir=${file("src/main/generated")}" + vmArg "-Dfabric-api.datagen.modid=${modid}" + + runDir "build/datagen" + } + } +} +// +// Adds the generated files into the jar you distribute to players. +// +sourceSets { + main { + resources { + srcDirs += [ + 'src/main/generated' + ] + } + } +} |