blob: 7640be24874c5871f7accd8256c590eed64b70f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
import net.fabricmc.loom.task.RemapJarTask
plugins {
id 'fabric-loom' version '0.2.5-SNAPSHOT'
id 'com.github.johnrengelman.shadow' version '4.0.1'
}
configurations {
shade
compile.extendsFrom shade
}
dependencies {
minecraft "com.mojang:minecraft:19w34a"
mappings "net.fabricmc:yarn:19w34a+build.8"
modCompile "net.fabricmc:fabric-loader:0.4.9+build.161"
shade project(':spark-common')
}
processResources {
inputs.property "version", project.version
from(sourceSets.main.resources.srcDirs) {
include "fabric.mod.json"
expand "pluginVersion": project.pluginVersion, "pluginDescription": project.pluginDescription
}
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}
shadowJar {
archiveFileName = 'spark-fabric-dev.jar'
configurations = [project.configurations.shade]
relocate 'okio', 'me.lucko.spark.lib.okio'
relocate 'okhttp3', 'me.lucko.spark.lib.okhttp3'
relocate 'net.kyori.text', 'me.lucko.spark.lib.text'
relocate 'org.tukaani.xz', 'me.lucko.spark.lib.xz'
relocate 'com.google.protobuf', 'me.lucko.spark.lib.protobuf'
}
task remappedShadowJar(type: RemapJarTask) {
dependsOn tasks.shadowJar
input = tasks.shadowJar.archiveFile
addNestedDependencies = true
archiveFileName = 'spark-fabric.jar'
}
tasks.assemble.dependsOn tasks.remappedShadowJar
artifacts {
archives remappedShadowJar
shadow shadowJar
}
|