I am using AutoParcel
and Dagger2
for autogenerated code, which requires use of the gradle android-apt
plugin. Which means that the first compile fails, but when you run the task for a second time, it succeeds. Normally this is only a slight annoyance, but this becomes a big issue with continuous integration tools like CircleCI or TravisCI, which always run clean builds.
./gradlew :app:clean
./gradlew :app:compileDebugJava //fails
./gradlew :app:compileDebugJava //succeeds
How can an Android dev get around this? Obviously, I do not want every CI build to report a failure.
circle.yml
test:
pre:
- ./gradlew :android:compileDebugJava -PdisablePreDex
override:
- ./gradlew :android:compileDebugJava -PdisablePreDex