2 years ago

#72347

test-img

Mustafa Zengin

How to prevent gradle build from failing early?

I am trying to compile a set of Java files with some external dependencies, but the build fails early without going through all the files. What I would like to achieve is to report all the compilation failures in all files after a single gradle build call. How can I force the compiler to continue compiling even after hitting errors?

There is no interdependency between the files I attempt to compile. The compilation failures are only with respect to types defined in external library dependencies.

I tried increasing the heap memory size in jvmargs, that doesn't seem to be the problem. I have also tried increasing -Xmaxerrors, that only affects the number of errors "printed", not the number of errors to hit before finishing the compilation.

The error count is also not constant for the "bail out early" condition, for different sets of files I get different max error count, so I don't know how the compiler decides to stop.

java

gradle

build.gradle

javac

0 Answers

Your Answer

Accepted video resources