dependencies { api 'com.github.ben-manes.caffeine:caffeine:2.8.5' api 'com.google.code.gson:gson:2.8.0' api 'org.apache.commons:commons-lang3:3.6' api group: 'commons-io', name: 'commons-io', version: '2.5' api 'com.flowpowered:flow-math:1.0.3' api 'org.spongepowered:configurate-hocon:4.1.1' api 'org.spongepowered:configurate-gson:4.1.1' api 'com.github.Querz:NBT:4.0' api 'org.apache.commons:commons-dbcp2:2.9.0' testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2' } test { useJUnitPlatform() } processResources { def git = versionDetails() from(sourceSets.main.resources.srcDirs) { include 'de/bluecolored/bluemap/version.json' duplicatesStrategy = DuplicatesStrategy.WARN expand ( version: project.version, gitHash: git.gitHashFull, gitClean: git.isCleanTag ) } } license { exclude('**/AABB.java') } //resource Extensions String[] resourceIds = [ "1_13", "1_15", "1_16", "1_18" ]; task zipResourceExtensions { for (String id : resourceIds) { dependsOn "zipResourceExtensions$id" } } for (String id : resourceIds) zipResourcesTask(id) void zipResourcesTask(String resourceId) { task ("zipResourceExtensions$resourceId", type: Zip) { from fileTree("src/main/resourceExtensions/mc$resourceId") archiveName 'resourceExtensions.zip' destinationDir(file("src/main/resources/de/bluecolored/bluemap/mc$resourceId/")) outputs.upToDateWhen{ false } } } //always update the zip before build processResources.dependsOn(zipResourceExtensions)