Skip to content

Commit

Permalink
Remove obsolete -dev jars
Browse files Browse the repository at this point in the history
These no longer do anything useful in modern Fabric versions.
  • Loading branch information
Alexander01998 committed Nov 5, 2024
1 parent b861db9 commit da01afa
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,15 @@ publishMods {
}

afterEvaluate {
tasks.publishMods.dependsOn moveDevLibs
tasks.publishCurseforge.dependsOn moveDevLibs
tasks.publishModrinth.dependsOn moveDevLibs
}

task moveDevLibs(dependsOn: [remapJar, remapSourcesJar]) {
doLast {
def archivesName = project.base.archivesName.get() as String
ant.move(file:"${project.buildDir}/devlibs/${archivesName}-${version}-dev.jar", tofile:"${project.buildDir}/libs/${archivesName}-${version}-dev.jar")
ant.move(file:"${project.buildDir}/devlibs/${archivesName}-${version}-sources.jar", tofile:"${project.buildDir}/libs/${archivesName}-${version}-sources-dev.jar")
}
tasks.publishMods.dependsOn build
tasks.publishCurseforge.dependsOn build
tasks.publishModrinth.dependsOn build
}

import org.kohsuke.github.GHReleaseBuilder
import org.kohsuke.github.GitHub

task github(dependsOn: moveDevLibs) {
task github(dependsOn: build) {
onlyIf {
ENV.GITHUB_TOKEN
}
Expand All @@ -144,7 +136,6 @@ task github(dependsOn: moveDevLibs) {
def github = GitHub.connectUsingOAuth(ENV.GITHUB_TOKEN as String)
def repository = github.getRepository("Wurst-Imperium-MCX/WI-Zoom")
def ghVersion = "v" + version.substring(0, version.indexOf("-"))
def archivesName = project.base.archivesName.get() as String

def ghRelease = repository.getReleaseByTagName(ghVersion as String)
if(ghRelease == null) {
Expand All @@ -154,7 +145,5 @@ task github(dependsOn: moveDevLibs) {

ghRelease.uploadAsset(remapJar.archiveFile.get().getAsFile(), "application/java-archive")
ghRelease.uploadAsset(remapSourcesJar.archiveFile.get().getAsFile(), "application/java-archive")
ghRelease.uploadAsset(new File("${project.buildDir}/libs/${archivesName}-${version}-dev.jar"), "application/java-archive")
ghRelease.uploadAsset(new File("${project.buildDir}/libs/${archivesName}-${version}-sources-dev.jar"), "application/java-archive")
}
}

0 comments on commit da01afa

Please sign in to comment.