BlueMap/BlueMapFabric/build.gradle

65 lines
1.9 KiB
Groovy
Raw Normal View History

2020-05-12 19:49:44 +02:00
import net.fabricmc.loom.task.RemapJarTask
2020-05-11 20:07:39 +02:00
plugins {
2020-08-03 16:19:51 +02:00
id 'fabric-loom' version '0.4-SNAPSHOT'
2020-05-11 20:07:39 +02:00
}
configurations {
compile.extendsFrom shadowInclude
2020-05-11 20:07:39 +02:00
}
dependencies {
minecraft "com.mojang:minecraft:1.15.2"
2020-08-19 20:58:49 +02:00
mappings "net.fabricmc:yarn:1.15.2+build.17:v2"
modImplementation "net.fabricmc:fabric-loader:0.9.2+build.206"
2020-05-11 20:07:39 +02:00
modImplementation "net.fabricmc.fabric-api:fabric-api:0.5.1+build.294-1.15"
2020-05-12 19:49:44 +02:00
shadowInclude (project(':BlueMapCommon')) {
2020-05-11 20:07:39 +02:00
//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"
}
}
2020-05-12 19:49:44 +02:00
shadowJar {
configurations = [project.configurations.shadowInclude]
2020-05-12 19:49:44 +02:00
//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 'org.yaml.snakeyaml', 'de.bluecolored.shadow.yaml.snakeyaml'
//exclude '/mappings/*'
2020-05-12 19:49:44 +02:00
}
task ramappedShadowJar(type: RemapJarTask) {
2020-08-03 14:18:47 +02:00
destinationDir = file '../build/release'
2020-05-12 19:49:44 +02:00
dependsOn tasks.shadowJar
input = tasks.shadowJar.archivePath
addNestedDependencies = true
archiveName = "BlueMap-${version}-fabric.jar"
}
build.dependsOn ramappedShadowJar
2020-05-12 19:49:44 +02:00
2020-05-11 20:07:39 +02:00
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}