Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在执行一项GradleBuild任务,我想维护当前脚本已赋予的所有属性。换句话说,我想打包“这些启动参数”并将它们传递给我正在调用的构建。
GradleBuild
有没有办法干净地做到这一点?
如果您的意思是项目属性:
task foo(type: GradleBuild) { startParameter.projectProperties = gradle.startParameter.projectProperties }
如果您的意思是系统属性,请替换projectProperties为systemPropertiesArgs(两侧)。
projectProperties
systemPropertiesArgs