Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

adding || true will report a failing task as successful with CircleCI.

test:
  pre:
     - ./gradlew :android:compileDebugJava -PdisablePreDex || true
  override:
     - ./gradlew :android:compileDebugJava -PdisablePreDex
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.