mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-29 14:06:32 +01:00
69 lines
2.3 KiB
Groovy
69 lines
2.3 KiB
Groovy
import net.fabricmc.loom.task.RemapJarTask
|
|
|
|
plugins {
|
|
id 'fabric-loom' version '0.4-SNAPSHOT'
|
|
}
|
|
|
|
configurations {
|
|
compile.extendsFrom shadowInclude
|
|
}
|
|
|
|
dependencies {
|
|
minecraft "com.mojang:minecraft:1.15.2"
|
|
mappings "net.fabricmc:yarn:1.15.2+build.17:v2"
|
|
modImplementation "net.fabricmc:fabric-loader:0.9.2+build.206"
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:0.19.0+build.325-1.15"
|
|
|
|
shadowInclude (project(':BlueMapCommon')) {
|
|
//exclude dependencies provided by fabric
|
|
exclude group: 'com.google.guava', module: 'guava'
|
|
exclude group: 'com.google.code.gson', module: 'gson'
|
|
exclude group: 'org.apache.commons', module: 'commons-lang3'
|
|
exclude group: 'commons-io', module: 'commons-io'
|
|
exclude group: 'com.mojang', module: 'brigadier'
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
inputs.property "version", project.version
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
include "fabric.mod.json"
|
|
expand "version": project.version
|
|
}
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
exclude "fabric.mod.json"
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
configurations = [project.configurations.shadowInclude]
|
|
|
|
//relocate 'com.flowpowered.math', 'de.bluecolored.shadow.flowpowered.math' //DON'T relocate this, because the API depends on it
|
|
relocate 'com.typesafe.config', 'de.bluecolored.shadow.typesafe.config'
|
|
relocate 'net.querz.nbt', 'de.bluecolored.shadow.querz.nbt'
|
|
relocate 'ninja.leaping.configurate', 'de.bluecolored.shadow.ninja.leaping.configurate'
|
|
relocate 'com.github.benmanes.caffeine', 'de.bluecolored.shadow.benmanes.caffeine'
|
|
relocate 'com.google.errorprone', 'de.bluecolored.shadow.google.errorprone'
|
|
relocate 'org.aopalliance', 'de.bluecolored.shadow.aopalliance'
|
|
relocate 'javax.inject', 'de.bluecolored.shadow.javax.inject'
|
|
relocate 'com.google.inject', 'de.bluecolored.shadow.google.inject'
|
|
relocate 'org.checkerframework', 'de.bluecolored.shadow.checkerframework'
|
|
relocate 'org.codehaus', 'de.bluecolored.shadow.codehaus'
|
|
}
|
|
|
|
task ramappedShadowJar(type: RemapJarTask) {
|
|
destinationDir = file '../../build/release'
|
|
dependsOn tasks.shadowJar
|
|
input = tasks.shadowJar.archivePath
|
|
addNestedDependencies = true
|
|
archiveName = "BlueMap-${version}-fabric-1.15.2.jar"
|
|
}
|
|
build.dependsOn ramappedShadowJar
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = "sources"
|
|
from sourceSets.main.allSource
|
|
}
|