有没有办法向“build.gradle”文件添加一些内容,使其根据项目中代码的更改自动构建?或者是否有任何 gradle 或 java 自动编译/构建项目的技巧?
最佳答案
使用gradle --continuous myTask
。
这是全新 2.5 version 的一个特点.
When you run with the --continuous or -t command line options, Gradle will not exit at the end of a build. Instead, Gradle will wait for files that are processed by the build to change. When changes are detected, Gradle will re-run the previous build with the same task selection.
关于java - 更改代码后让 gradle 自动构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31459461/