Skip to content

Commit 077709a

Browse files
committed
Fix missing dependency in final jar
1 parent 8cbf663 commit 077709a

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

build.gradle

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
buildscript {
22
dependencies {
33
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
4+
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.4'
45
}
56
repositories {
67
jcenter()
@@ -11,7 +12,9 @@ buildscript {
1112
}
1213
}
1314
}
15+
1416
apply plugin: 'net.minecraftforge.gradle.forge'
17+
apply plugin: 'com.github.johnrengelman.shadow'
1518

1619
version = version_major + "." + version_minor + "." + version_patch + version_extra
1720
group = "com.flansmod"
@@ -26,6 +29,7 @@ compileJava {
2629

2730
dependencies {
2831
compile "io.vavr:vavr:0.10.2"
32+
shadow "io.vavr:vavr:0.10.2"
2933
}
3034

3135
minecraft {
@@ -155,7 +159,7 @@ task clearOutput(type: Delete) {
155159

156160
task outputJar(type: Jar) {
157161
destinationDir = new File("build/output/mods/")
158-
from(zipTree("build/libs/${archiveName}")) {
162+
from(zipTree("build/libs/${archivesBaseName}-${version}-all.jar")) {
159163
exclude '**/apocalypse/'
160164
exclude '**/mw/'
161165
exclude '**/nerf/'
@@ -175,7 +179,20 @@ task outputPacks(type: Copy) {
175179
into 'build/output/Flan/'
176180
}
177181

182+
shadowJar {
183+
configurations = [project.configurations.shadow]
184+
}
185+
186+
reobf {
187+
shadowJar {
188+
mappingType = "SEARGE"
189+
}
190+
}
191+
192+
tasks.reobfShadowJar.mustRunAfter shadowJar
193+
178194
build {
195+
dependsOn reobfShadowJar
179196
dependsOn contentPacks
180197
dependsOn clearOutput
181198
dependsOn outputJar

0 commit comments

Comments
 (0)