4

With gradle 1.2.3 and android studio, running ./gradlew createDebugCoverageReport gives me a coverage report based on my project's tests.

Switching to gradle 1.3.0 causes this task to fail, giving me Task 'createDebugCoverageReport' not found in root project '[edited]'. Looking at gradle's source code, the jacoco part has been removed in 1.3.0 1.2.3 source, 1.3.0 source

I can't find any discussion on why was it removed and/or how can I run this coverage report using gradle 1.3.0. Any ideas?

2
  • Gradle 1.3? The current version of Gradle is 2.6. Do you mean the android plugin? Commented Aug 31, 2015 at 19:05
  • I'm referring to Gradle plugin for Android Studio: mvnrepository.com/artifact/com.android.tools.build/gradle/1.2.3 . I'll make it clearer in the title. Commented Aug 31, 2015 at 19:09

2 Answers 2

3

Could you drop down the list at the right panel of Android Studio(Gradle mark) ? There is "Tasks" -> "other", and you can find

create{$flavorName}DebugCoverageReport

and then do ./gradlew create{$flavorName}DebugCoverageReport

for example ./gradlew createBananaDebugCoverageReport

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, but this was a 1.3.0-specific bug, in 1.3.1 works again.
I had the same issue in 1.5.0 so I think this answer should be considered helpful.
1

It was re-enabled in gradle 1.3.1 (Release Notes), switching to that gradle version works fine.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.