Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to jacoco 0.8.7 #195

Open
ardevd opened this issue May 28, 2021 · 7 comments
Open

Update to jacoco 0.8.7 #195

ardevd opened this issue May 28, 2021 · 7 comments

Comments

@ardevd
Copy link

ardevd commented May 28, 2021

Older Jacoco versions are incompatible with the Kotlin 1.5.x compiler. See this for more information.

However, setting jacocoVersion = '0.8.7'seems to crash tests.

@trietbui85
Copy link

oh, can you share the crash log @ardevd ?
I have plan to upgrade Kotlin to 1.5.0, thus will upgrade jacocoVersion = '0.8.7' too.

@ilians
Copy link

ilians commented Jul 26, 2021

I had the same issue with crashing tests when updating to kotlin 1.5.0 or 1.5.10, for some reason upgrading to kotlin 1.5.21 seems to work without issues.

@tobiasKaminsky
Copy link

For our projects it still fails with 1.5.21
Ref: nextcloud/android-library#669

@trietbui85
Copy link

Should we still use vanniktech/gradle-android-junit-jacoco-plugin since the author doesn't seem to maintain it?

@dsuresh-ap
Copy link

You need JaCoCO 0.8.7 for Java 11 but compiling the source with Java 11 results in a error. See https://issuetracker.google.com/issues/178400721

The setup we went with is:

  • AGP 7.x+
  • Kotlin 1.5.x+
  • JaCoCo 0.8.7+
  • Java 11 set as the JDK
  • Java 1.8 set as jvmTarget and compileOptions

@mariofelesdossantosjunior
Copy link

mariofelesdossantosjunior commented Sep 4, 2021

I believe the problem is AGP 7.x.x in AGP 4.2.2 apparently everything is fine

The setup we went with is:

AGP 4.2.2
Kotlin 1.5.x+
JaCoCo 0.8.7
Java 11 set as the JDK
Java 1.8 set as jvmTarget and compileOptions

Using AGP 7.0.2 is simply not generating jacoco in Android modules
2021-09-04_20-58

@jakubdzubak1
Copy link

jakubdzubak1 commented Jan 1, 2022

I faced same issue after updating AGP from 4.2.2 to 7.0.4, jacoco folder was missing in build dir.

My current setup:
AGP 7.0.4
Kotlin 1.6.10
JaCoCo 0.8.7
Java 11 set as the JDK
Java 1.8 set as jvmTarget and compileOptions

I had to change execution data path in jacoco.gradle using executionData.from = files("${project.buildDir}/outputs/unit_test_code_coverage/sandboxDebugUnitTest/testSandboxDebugUnitTest.exec")

Screenshot 2022-01-01 at 15 17 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants