BlueMap/BlueMapCore/build.gradle

89 lines
2.5 KiB
Groovy

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'
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_12", "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 }
}
}
/*
task zipResourceExtensions1_12(type: Zip) {
from fileTree('src/main/resourceExtensions/mc1_12')
archiveName 'resourceExtensions.zip'
destinationDir(file('src/main/resources/de/bluecolored/bluemap/mc1_12/'))
outputs.upToDateWhen { false }
}
task zipResourceExtensions1_13(type: Zip) {
from fileTree('src/main/resourceExtensions/mc1_13')
archiveName 'resourceExtensions.zip'
destinationDir(file('src/main/resources/de/bluecolored/bluemap/mc1_13/'))
outputs.upToDateWhen { false }
}
task zipResourceExtensions1_15(type: Zip) {
from fileTree('src/main/resourceExtensions/mc1_15')
archiveName 'resourceExtensions.zip'
destinationDir(file('src/main/resources/de/bluecolored/bluemap/mc1_15/'))
outputs.upToDateWhen { false }
}
task zipResourceExtensions1_16(type: Zip) {
from fileTree('src/main/resourceExtensions/mc1_16')
archiveName 'resourceExtensions.zip'
destinationDir(file('src/main/resources/de/bluecolored/bluemap/mc1_16/'))
outputs.upToDateWhen { false }
}
*/
//always update the zip before build
processResources.dependsOn(zipResourceExtensions)