Easier to yoink the build.gradle

This commit is contained in:
CocoTheOwner 2021-08-09 23:01:57 +02:00
parent e45eb7f2be
commit d2d2dc64db

View File

@ -72,15 +72,15 @@ task release(type: proguard.gradle.ProGuardTask) {
verbose() verbose()
} }
def registerCustomOutputTask(name, path) { def registerCustomOutputTask(dname, path) {
tasks.register('build' + name, Copy) { tasks.register('build' + dname, Copy) {
group('development') group('development')
outputs.upToDateWhen { false } outputs.upToDateWhen { false }
dependsOn ':shadowJar' dependsOn ':shadowJar'
from(file('build/libs/Iris-' + version + '-all.jar')) from(file('build/libs/Iris-' + version + '-all.jar'))
into(file(path)) into(file(path))
rename { String fileName -> rename { String fileName ->
fileName.replace('Iris-' + version + '-all.jar', "Iris.jar") fileName.replace(name + '-' + version + '-all.jar', name + ".jar")
} }
} }
} }
@ -90,10 +90,10 @@ file(jar.archiveFile.get().getAsFile().getParentFile().getParentFile().getParent
processResources { processResources {
filesMatching('**/plugin.yml') { filesMatching('**/plugin.yml') {
expand( expand(
'name': name.toString(), 'name': name.toString(),
'version': version.toString(), 'version': version.toString(),
'main': main.toString(), 'main': main.toString(),
'apiversion': apiVersion.toString() 'apiversion': apiVersion.toString()
) )
} }
} }