3
我正在嘗試編譯使用最新版本gradle
的現有代碼庫。構建失敗歸因於模塊以下行build.gradle
文件:Gradle:沒有這類財產的類?
project.setProperty("doNow", true)
與此錯誤:
No such property: doNow for class: org.gradle.api.internal.project.DefaultProject_Decorated
我需要引起錯誤的行前的build.gradle中聲明該屬性?
從gradle這個文檔的setProperty
:
Sets a property of this project. This method searches for a property with the given name in the following locations, and sets the property on the first location where it finds the property.
這是什麼呢? – java123999
它創建可以稍後設置的屬性。 – Opal
Gradle文檔:https://docs.gradle.org/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html – cjstehno