mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2025-01-23 21:51:37 +01:00
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
import org.gradle.kotlin.dsl.support.uppercaseFirstChar
|
|
|
|
plugins {
|
|
id("root-plugin")
|
|
}
|
|
|
|
tasks {
|
|
assemble {
|
|
val jarsDir = File("$rootDir/jars")
|
|
|
|
doFirst {
|
|
delete(jarsDir)
|
|
|
|
jarsDir.mkdirs()
|
|
}
|
|
|
|
subprojects.filter { it.name == "paper" || it.name == "fabric" }.forEach { project ->
|
|
dependsOn(":${project.name}:build")
|
|
|
|
doLast {
|
|
runCatching {
|
|
val file = File("$jarsDir/${project.name.uppercaseFirstChar().lowercase()}")
|
|
|
|
file.mkdirs()
|
|
|
|
copy {
|
|
from(project.layout.buildDirectory.file("libs/${rootProject.name}-${project.version}.jar"))
|
|
into(file)
|
|
}
|
|
}.onSuccess {
|
|
// Delete to save space on jenkins.
|
|
delete(project.layout.buildDirectory.get())
|
|
delete(rootProject.layout.buildDirectory.get())
|
|
}.onFailure {
|
|
println("Failed to copy file out of build folder into jars directory: Likely does not exist.")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |