From e7f79179b83e83e1cc2bcb261de52de1a44717b4 Mon Sep 17 00:00:00 2001 From: Pyrofab Date: Wed, 1 May 2024 19:21:54 +0200 Subject: [PATCH] Add testmod jar to build --- build.gradle | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/build.gradle b/build.gradle index 3ae2132..13ab07e 100644 --- a/build.gradle +++ b/build.gradle @@ -111,6 +111,31 @@ tasks.register("remapStandaloneJar", RemapJarTask) { assemble.dependsOn(remapStandaloneJar) + +var testmodJar = tasks.register('testmodJar', Jar) { + dependsOn testmodClasses + + archiveBaseName.set('Babblings') + archiveClassifier.set('dev') + from(sourceSets.testmod.output) { + include 'fabric.mod.json' + expand 'version': project.version + } + from(sourceSets.testmod.output) { + exclude 'fabric.mod.json' + } +} + +var remapTestmodJar = tasks.register('remapTestmodJar', RemapJarTask) { + dependsOn project.testmodJar + + archiveBaseName.set('Babblings') + inputFile.set(testmodJar.get().archiveFile) + addNestedDependencies = false +} + +build.dependsOn(remapTestmodJar) + chenille { configurePublishing { mainArtifact = remapStandaloneJar.archiveFile