2020-05-12 19:49:44 +02:00
|
|
|
import net.fabricmc.loom.task.RemapJarTask
|
|
|
|
|
2020-05-11 20:07:39 +02:00
|
|
|
plugins {
|
2021-06-08 22:44:55 +02:00
|
|
|
id 'fabric-loom' version '0.8-SNAPSHOT'
|
2020-05-11 20:07:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
2021-05-16 18:13:30 +02:00
|
|
|
implementation.extendsFrom shadowInclude
|
2020-05-11 20:07:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2020-09-12 13:49:42 +02:00
|
|
|
minecraft "com.mojang:minecraft:1.16.3"
|
|
|
|
mappings "net.fabricmc:yarn:1.16.3+build.1:v2"
|
|
|
|
modImplementation "net.fabricmc:fabric-loader:0.9.3+build.207"
|
|
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:0.20.2+build.402-1.16"
|
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
|
2020-08-30 13:25:22 +02:00
|
|
|
exclude group: 'com.google.guava', module: 'guava'
|
2020-05-11 20:07:39 +02:00
|
|
|
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
|
|
|
|
|
2021-06-08 22:44:55 +02:00
|
|
|
filesMatching("fabric.mod.json") {
|
2020-05-11 20:07:39 +02:00
|
|
|
expand "version": project.version
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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'
|
2021-05-16 18:13:30 +02:00
|
|
|
relocate 'org.spongepowered.configurate', 'de.bluecolored.shadow.configurate'
|
2020-08-23 12:36:29 +02:00
|
|
|
relocate 'com.github.benmanes.caffeine', 'de.bluecolored.shadow.benmanes.caffeine'
|
|
|
|
relocate 'com.google.errorprone', 'de.bluecolored.shadow.google.errorprone'
|
2020-08-30 13:25:22 +02:00
|
|
|
relocate 'org.aopalliance', 'de.bluecolored.shadow.aopalliance'
|
2020-08-30 14:41:51 +02:00
|
|
|
relocate 'javax.inject', 'de.bluecolored.shadow.javax.inject'
|
2020-08-30 13:25:22 +02:00
|
|
|
relocate 'com.google.inject', 'de.bluecolored.shadow.google.inject'
|
2020-08-23 12:36:29 +02:00
|
|
|
relocate 'org.checkerframework', 'de.bluecolored.shadow.checkerframework'
|
2020-08-30 13:25:22 +02:00
|
|
|
relocate 'org.codehaus', 'de.bluecolored.shadow.codehaus'
|
2021-05-16 18:13:30 +02:00
|
|
|
relocate 'io.leangen.geantyref', 'de.bluecolored.shadow.geantyref'
|
2020-05-12 19:49:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task ramappedShadowJar(type: RemapJarTask) {
|
2021-05-16 18:13:30 +02:00
|
|
|
destinationDirectory = file '../../build/release'
|
2020-05-12 19:49:44 +02:00
|
|
|
dependsOn tasks.shadowJar
|
2021-05-16 18:13:30 +02:00
|
|
|
input.set(tasks.shadowJar.archiveFile.get())
|
|
|
|
addNestedDependencies.set(true)
|
|
|
|
archiveFileName.set("BlueMap-${archiveVersion.get()}-fabric-1.16.4.jar")
|
2020-05-12 19:49:44 +02:00
|
|
|
}
|
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) {
|
2021-05-16 18:13:30 +02:00
|
|
|
archiveClassifier.set("sources")
|
2020-05-11 20:07:39 +02:00
|
|
|
from sourceSets.main.allSource
|
|
|
|
}
|