File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ val versionString =
4545
4646version = versionString
4747
48+ base.archivesName = " modernfix-forge"
49+
4850legacyForge {
4951 enable {
5052 forgeVersion = rootProject.properties[" forge_version" ].toString()
@@ -177,4 +179,22 @@ tasks.named<ProcessResources>("processResources") {
177179 filesMatching(" META-INF/mods.toml" ) {
178180 expand(" version" to project.version)
179181 }
182+ }
183+
184+ val finalJarTask = " reobfJar"
185+
186+ tasks.register<Copy >(" copyJarNameConsistent" ) {
187+ from(tasks.named<Jar >(finalJarTask).get().outputs.files)
188+ into(project.file(" build/libs" ))
189+ rename { name -> " modernfix-" + project.name + " -latest.jar" }
190+ }
191+
192+ tasks.register<Copy >(" copyJarToBin" ) {
193+ from(tasks.named<Jar >(finalJarTask).get().outputs.files)
194+ into(rootProject.file(" bin" ))
195+ mustRunAfter(tasks.named(" copyJarNameConsistent" ))
196+ }
197+
198+ tasks.named(" build" ) {
199+ dependsOn(" copyJarToBin" , " copyJarNameConsistent" )
180200}
You can’t perform that action at this time.
0 commit comments