Shorten the publishToModrinth task a bit by removing a with() and use the addFile method
This commit is contained in:
parent
20fc1fd80d
commit
d978898fe2
|
@ -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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue