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 {
|
2020-08-03 14:15:05 +02:00
|
|
|
compile.extendsFrom shadowInclude
|
2020-05-11 20:07:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
minecraft "com.mojang:minecraft:1.15.2"
|
|
|
|
mappings "net.fabricmc:yarn:1.15.2+build.15:v2"
|
|
|
|
modImplementation "net.fabricmc:fabric-loader:0.8.2+build.194"
|
|
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:0.5.1+build.294-1.15"
|
2020-05-12 19:49:44 +02:00
|
|
|
|
2020-08-03 14:15:05 +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 {
|
2020-08-03 14:15:05 +02:00
|
|
|
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'
|
|
|
|
|
2020-08-03 14:15:05 +02:00
|
|
|
//exclude '/mappings/*'
|
2020-05-12 19:49:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task ramappedShadowJar(type: RemapJarTask) {
|
|
|
|
destinationDir = file '../build/unsupported'
|
|
|
|
dependsOn tasks.shadowJar
|
|
|
|
input = tasks.shadowJar.archivePath
|
|
|
|
addNestedDependencies = true
|
|
|
|
archiveName = "BlueMap-${version}-fabric.jar"
|
|
|
|
}
|
2020-08-03 14:15:05 +02:00
|
|
|
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
|
|
|
|
}
|