Skip to content

Commit 9b31616

Browse files
committed
Clean up build script some more
1 parent 922d0f2 commit 9b31616

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,20 @@ configure(subprojects.findAll {it.name == "forge" || it.name == "fabric"}) {
182182
apply plugin: 'com.matthewprenger.cursegradle'
183183
apply plugin: 'com.modrinth.minotaur'
184184

185+
def copyJarNameConsistent = tasks.register('copyJarNameConsistent', Copy) {
186+
from remapJar // shortcut for createJar.outputs.files
187+
into project.file("build/libs")
188+
rename { name -> "modernfix-" + project.name + "-latest.jar" }
189+
}
190+
191+
def copyJarToBin = tasks.register('copyJarToBin', Copy) {
192+
from remapJar // shortcut for createJar.outputs.files
193+
into rootProject.file("bin")
194+
mustRunAfter "copyJarNameConsistent"
195+
}
196+
197+
tasks.build.dependsOn(copyJarToBin, copyJarNameConsistent)
198+
185199
def isBeta = project.version.toString().contains("beta")
186200

187201
curseforge {

fabric/build.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ remapJar {
6464
classifier null
6565
}
6666

67-
task copyJarToBin(type: Copy) {
68-
from remapJar // shortcut for createJar.outputs.files
69-
into rootProject.file("bin")
70-
}
71-
72-
tasks.build.dependsOn(copyJarToBin)
73-
7467
jar {
7568
classifier "dev"
7669
}

forge/build.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,6 @@ remapJar {
7878
classifier null
7979
}
8080

81-
task copyJarToBin(type: Copy) {
82-
from remapJar // shortcut for createJar.outputs.files
83-
into rootProject.file("bin")
84-
}
85-
86-
tasks.build.dependsOn(copyJarToBin)
87-
8881
jar {
8982
classifier "dev"
9083
manifest {

0 commit comments

Comments
 (0)