The only difference between archiveName and archiveFileName is that the former is a String and the latter is a Property<String> that can be more lazily configured. Any Property (Gradle API 7.3) you might use has the same API where you can get/set the value, so your only difference is jar.archiveName vs. jar.archiveFileName.get().