gradle - Coverage on Android Build -
i trying coverage android project based on gradle.
so add application build.gradle
jacoco { }
and
testcoverageenabled true
inside debug.
this working ok. can report createdebugcoveragereport
or connectedcheck
.
the problem debug builds used developers run , test app. having code coverage enabled inside build might slow build , not needed usage.
so thought add new configuratuon
coverage { initwith buildtypes.debug testcoverageenabled true }
unfortunately there no createcoveragecoveragereport
, connectedcheck
not run coverage type.
when decompile apk dex2jar , inside jd-gui see jacoco calls inside debug , coverage there not launched gradle plugin coverage.
this makes me think coverage hardcoded debug builds.
the questions are: 1. thinking need coverage buildtype ok ? think debug build should separate of build coverage 2. jacoco report available in debug build? if not how run on coverage type? 3. can find source code of jacoco extension. see implemetnation ? found this , build-system/gradle-core/src/main/groovy/com/android/build/gradle/internal/coverage/jacocoextension.groovy
have feeling thtat not 1 used gradle plugin.
i got partial answer gradle team http://comments.gmane.org/gmane.comp.handhelds.android.adt.devel/5978
basically need define coverage test buidl done via
android { testbuildtype "coverage" }
in build.gradle. answers why coverage goals not present in coverage build type.
Comments
Post a Comment