davorpa / mynavapp-android

Sample application with a Navigation Drawer Activity
Apache License 2.0
1 stars 1 forks source link

Solve config to integrate Gradle/Travis CI/Coverall with Jacoco #1

Open davorpa opened 4 years ago

davorpa commented 4 years ago

Hi everybody

Coverall gradle plugin is referenced at parent module https://github.com/davorpa/mynavapp-android/blob/148c96f031e8ad8af53405e11e5e1220d82a43ff/build.gradle#L103

And ind app module, the coverall coverage task + Jajojo enabled and defined and configured for only on Travis, I think, at https://github.com/davorpa/mynavapp-android/blob/148c96f031e8ad8af53405e11e5e1220d82a43ff/app/build.gradle#L4 https://github.com/davorpa/mynavapp-android/blob/148c96f031e8ad8af53405e11e5e1220d82a43ff/app/build.gradle#L26-L34 https://github.com/davorpa/mynavapp-android/blob/148c96f031e8ad8af53405e11e5e1220d82a43ff/app/build.gradle#L95-L104

And executed by travis in script with this coverage task https://github.com/davorpa/mynavapp-android/blob/148c96f031e8ad8af53405e11e5e1220d82a43ff/.travis.yml#L101-L107

Sometimes my travis crash waiting for emulator, others adverting unrecognized commands. Also I dont know if it config is right well because I have picked some ideas of a bunch of blogs without any sucess.

¿How to solve it?

davorpa commented 4 years ago

Some intents with a possible fix proposed by other people with similar situation and environment

https://github.com/netmackan/ATimeTracker/tree/master/android-timetracker

https://stackoverflow.com/questions/57043288/use-jacoco-in-android-project-with-gradle

https://reflectoring.io/jacoco/

https://www.rallyhealth.com/coding/code-coverage-for-android-testing