在Gradle中,您可以通过以下方式从属性文件加载数据:
apply from: "version.properties"
从Gradle 2.0开始,这会生成一个警告:
"Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be removed in Gradle 2.0. Please read http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html for information on the replacement for dynamic properties."
在最新版本的Gradle中,相同行为的规范方式是什么?
当然,我可以通过定义一个辅助方法来解决这个问题,但我很好奇是否有更简洁的方法。