标签: gradle
我试图更改jar archive output path。
apply plugin: 'java' apply plugin: 'application' jar { archivePath = "$destinationDir/../$archiveName" }
然后我收到错误:Cannot set the value of read-only property 'archivePath' on task ':jar'.
Cannot set the value of read-only property 'archivePath' on task ':jar'.
我有什么方法可以实现这种变化吗?
答案 0 :(得分:1)
看看here。 archivePath只是一个只读属性,由destinationDir和archiveName构成。您可以修改两个提到的属性,但不能修改结果。
archivePath
destinationDir
archiveName