Can you share your gradle file as well? The questions I'd want to answer by
looking at it are:
- When you run your test module, what gradle task are you using?
- When you generate your coverage, are you doing it after a successful test
run?
- From module 1 / 2, are you calling sourceSets.androidTest.setRoot() and
using the test module?
- Are you using the builtin Jacoco from Android plugin, or trying to run
your own config of Jacoco plugin?
- When you say empty report, what do you mean? Is there an actual
index.html and it just doesn't have any classes listed?
>From my experience, it is very hard to customize the Jacoco that comes with
Android plugin. You should be able to add configuration options to
android.jacoco{}, but the only thing supported is 'version'. This is
because we have a special version of JacocoExtension that is very limited:
com.android.build.gradle.internal.coverage. Long story short, you should
probably be rolling your own jacoco task. :)
On Thursday, March 5, 2015 at 7:32:25 PM UTC-5, [email protected] wrote:
>
> Hi, I am new to jacoco I have a multi module android project building with
> gradle and want to collect code coverage, saw jacoco will help but my
> project structure is like,
>
> Module 1
> -src
> --main
> ---java
> ---res
>
> Module 2
> -src
> --main
> ---java
> ---res
>
> Module Test
> -src
> --main
> ---java
> ---res
>
> when I try gradlew createDebugCoverageReport, it creates a report but an
> empty one. Am not sure how to test my jacoco that my use test from Test
> module and use src code from Module 1 and 2, if there is any tutorial to
> set up multi module android project with gradle , jacoco, please let me
> know. Thanks
--
You received this message because you are subscribed to the Google Groups
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/65a4c233-94db-4d79-9a53-bd9a963365f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.