Skip to content

Commit

Permalink
Adjust uploadBackups task for NeoForge
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Nov 14, 2024
1 parent 1f63f1d commit bd3e33b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ task closeMilestone {
}

task uploadBackups {
dependsOn build
dependsOn tasks.named("renameJarJar")

onlyIf {
ENV.WI_BACKUPS_API_KEY
Expand All @@ -378,8 +378,10 @@ task uploadBackups {
connection.doOutput = true

def output = connection.outputStream
[remapJar, remapSourcesJar].each { jarTask ->
def file = jarTask.archiveFile.get().asFile
def libsDir = layout.buildDirectory.dir("libs").get().asFile
def jarFiles = libsDir.listFiles().findAll { it.name.endsWith(".jar") }

jarFiles.each { file ->
output << "--${boundary}\r\n"
output << "Content-Disposition: form-data; name=\"files\"; filename=\"${file.name}\"\r\n"
output << "Content-Type: application/java-archive\r\n\r\n"
Expand Down

0 comments on commit bd3e33b

Please sign in to comment.