subprojects { apply plugin: "java" repositories { maven { url "https://maven.fabricmc.net/" } maven { url "https://git.selimaj.dev/api/packages/selimaj-dev/maven" } mavenCentral() } dependencies { implementation "de.javagl:obj:0.4.0" implementation "com.formdev:svgSalamander:1.1.4" implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0' implementation 'com.fasterxml.jackson.core:jackson-annotations:2.17.0' implementation 'com.fasterxml.jackson.core:jackson-core:2.17.0' } } configure(subprojects.findAll { it.name != "common" }) { dependencies { implementation project(":common") sourceSets { main { resources { srcDir project(":common").file("src/main/resources") } } } } } tasks.register("buildAll") { group = "build" description = "Builds all subprojects and collects their remapped jars" // Only build remapped jars (not full build) dependsOn subprojects.collect { proj -> proj.tasks.matching { it.name == "remapJar" } } doLast { def outputDir = file("$buildDir/allJars") outputDir.mkdirs() subprojects.each { proj -> def remapTask = proj.tasks.findByName("remapJar") if (remapTask != null) { def jarFile = remapTask.archiveFile.get().asFile if (jarFile.exists() && !jarFile.name.contains("sources")) { copy { from jarFile into outputDir rename { "${jarFile.name}" } } } } } println "All remapped jars collected in: $outputDir" } }