as named instead of get by name

also multi line test
a
This commit is contained in:
alexcrea 2026-01-12 00:22:51 +01:00
parent e71a81468d
commit e5efdf0c5a
Signed by: alexcrea
GPG key ID: E346CD16413450E3

View file

@ -369,7 +369,7 @@ hangarPublish {
register(Platforms.PAPER) { register(Platforms.PAPER) {
// Set the JAR file to upload // Set the JAR file to upload
var task = if(isOnline) tasks.shadowJar var task = if(isOnline) tasks.shadowJar
else tasks.getByName("offlineJar") as TaskProvider<ShadowJar> else tasks.named("offlineJar") as TaskProvider<ShadowJar>
jar.set(task.flatMap { it.archiveFile }) jar.set(task.flatMap { it.archiveFile })