Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize incremental builds for android/gradle #532

Open
riyaz opened this issue Dec 8, 2016 · 2 comments
Open

Optimize incremental builds for android/gradle #532

riyaz opened this issue Dec 8, 2016 · 2 comments

Comments

@riyaz
Copy link
Contributor

riyaz commented Dec 8, 2016

We have lot of 'grandfathered' issues which we are fixing, below are the workflow we typically use


1. ./gradlew clean
2. infer --reactive -- ./gradlew --offline assembleDebug
3. Note down the issues and fix
4. infer --reactive --continue -- ./gradlew --offline assembleDebug

Above works fine, however step 4 seems to analyse the complete project even though only 1 file changed and it takes more time to analyse and report.

is there any flags or options which we can use to build only a file or two when using gradle, I'm aware its possible for normal java builds but how about gradle builds?

@cristianoc
Copy link
Contributor

Note that using --continue option, it will keep on growing the set of files to be analyzed. So in your particular case, since it follows a complete compilation, it will repeatedly analyze everything.

You might want to try without --continue, i.e. step 4 is the same as step 2, so only the files compiled in the last gradlew invocation will be analyzed.

@jvillard
Copy link
Contributor

Infer's gradle integration is very primitive and loses most of the incrementality of builds. @cristianoc's suggestion may help, but if you want fast and truly incremental analyses you may want to look into using okbuck and use infer's much better performing Buck integration. Another solution would be for someone to write a gradle plugin for infer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants