Shorten the publishToModrinth task a bit by removing a with() and use the addFile method

This commit is contained in:
Username404-59 2021-04-15 21:08:21 +02:00
parent 20fc1fd80d
commit d978898fe2
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 5 additions and 7 deletions

View File

@ -138,13 +138,11 @@ tasks {
versionType = VersionType.ALPHA versionType = VersionType.ALPHA
detectLoaders = false detectLoaders = false
versionName = "${project.name} $versionNumber for Minecraft $gameVersions and higher" versionName = "${project.name} $versionNumber for Minecraft $gameVersions and higher"
with(fileTree("$rootDir/shrinkedJars/")) { fileTree("$rootDir/shrinkedJars/").files.forEach {
files.forEach { with(it.name) {
with(it.name) { when {
when { contains("fabric") -> uploadFile = it
contains("fabric") -> uploadFile = it contains("forge") -> addFile(it)
contains("forge") -> additionalFiles.add(it)
}
} }
} }
} }