mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-14 19:25:23 -05:00
Generate a test datapack from the datagen testmod output. (#2824)
* Add a datapack zip for testing the datagen module * Fix deprecation
This commit is contained in:
parent
ccd377ba6b
commit
abdb4ad90b
2 changed files with 16 additions and 0 deletions
|
@ -53,6 +53,16 @@ loom {
|
|||
|
||||
test.dependsOn runDatagen
|
||||
|
||||
task datapackZip(type: Zip, dependsOn: runDatagen) {
|
||||
archiveFileName = "${archivesBaseName}-${project.version}-test-datapack.zip"
|
||||
destinationDirectory = layout.buildDirectory.dir('libs')
|
||||
|
||||
from file("src/testmod/generated")
|
||||
from file("pack.mcmeta")
|
||||
}
|
||||
|
||||
build.dependsOn datapackZip
|
||||
|
||||
import org.objectweb.asm.ClassReader
|
||||
import org.objectweb.asm.Opcodes
|
||||
import org.objectweb.asm.tree.ClassNode
|
||||
|
|
6
fabric-data-generation-api-v1/pack.mcmeta
Normal file
6
fabric-data-generation-api-v1/pack.mcmeta
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"pack": {
|
||||
"pack_format": 10,
|
||||
"description": "Datagen test Data Pack"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue