-
Notifications
You must be signed in to change notification settings - Fork 111
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
Build failing on Gradle 8.0 #102
Comments
Unfortunately it looks like this repo is abandoned. I've spent the last few days bashing away at replacing this plugin for my own project and seem to have gotten my own script working. There are many, many similar examples online but most of them are out of date (Android Gradle Plugin/Gradle seem to break things every major release 🙄), so as of May 2023 the following works for my project. Import the following into each of your module
I'm currently using Gradle 8.0 and Jacoco 0.8.8 (I have this defined in the root project's
jacoco.gradle
Note: that this script does NOT put the output files in the same directory that the plugin does. This is important if you're passing the coverage information off to something like Sonar. If you're using Sonar, I'm setting the xmlReportPaths property to -
If set up correctly, running Note for the future - inevitably, Gradle/Android Gradle Plugin will probably break this again. Chances are, the sourceDirectories, classDirectories or executionData directories have changed. Note: I'm also not gathering coverage from integration tests, only unit tests, so if you need that, you'll probably need to add another path to the executionData array. At one point this directory was Hope this helps someone. |
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
I rewrote this plugin and removed all the usages of deprecated APIs (and also migrated to the new AGP variant API). |
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
see arturdm/jacoco-android-gradle-plugin#102 (comment) Signed-off-by: Andy Scherzinger <[email protected]>
* Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump actions/upload-artifact from 3.1.2 to 3.1.3 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v3.1.2...v3.1.3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump org.json:json from 20230227 to 20230618 Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20230227 to 20230618. - [Release notes](https://github.com/douglascrockford/JSON-java/releases) - [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md) - [Commits](https://github.com/douglascrockford/JSON-java/commits) --- updated-dependencies: - dependency-name: org.json:json dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Reduce CI complexity * Fix compileSdk deprecation * Build with java 17 * Introduce Kotlin * Remove jacoco * Fix publish * Bump org.robolectric:robolectric from 4.9.2 to 4.10.3 Bumps [org.robolectric:robolectric](https://github.com/robolectric/robolectric) from 4.9.2 to 4.10.3. - [Release notes](https://github.com/robolectric/robolectric/releases) - [Commits](robolectric/robolectric@robolectric-4.9.2...robolectric-4.10.3) --- updated-dependencies: - dependency-name: org.robolectric:robolectric dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Introduce Espresso tests It's a pre task for Strict violations oberservations * Improve logging * Keep more Espresso output * Bump org.jetbrains.kotlin:kotlin-gradle-plugin from 1.9.0 to 1.9.10 Bumps [org.jetbrains.kotlin:kotlin-gradle-plugin](https://github.com/JetBrains/kotlin) from 1.9.0 to 1.9.10. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.9.10/ChangeLog.md) - [Commits](JetBrains/kotlin@v1.9.0...v1.9.10) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Keep more Espresso output * Android Studio Giraffe * Switch to plugins * Revert "Remove jacoco" This reverts commit a02f946. * Run without daemon gradle/gradle#17229 (comment) * Using different plugin arturdm/jacoco-android-gradle-plugin#102 (comment) * First Kotlin conversion * Test api30 * Make some screenshots * Android Giraffe * Bump com.mxalbert.gradle:jacoco-android from 0.2.1-SNAPSHOT to 0.2.1 Bumps [com.mxalbert.gradle:jacoco-android](https://github.com/mxalbert1996/jacoco-android-gradle-plugin) from 0.2.1-SNAPSHOT to 0.2.1. - [Release notes](https://github.com/mxalbert1996/jacoco-android-gradle-plugin/releases) - [Commits](https://github.com/mxalbert1996/jacoco-android-gradle-plugin/commits/0.2.1) --- updated-dependencies: - dependency-name: com.mxalbert.gradle:jacoco-android dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Cleanup * Bump com.android.tools.build:gradle from 8.1.1 to 8.1.2 Bumps com.android.tools.build:gradle from 8.1.1 to 8.1.2. --- updated-dependencies: - dependency-name: com.android.tools.build:gradle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump org.mockito:mockito-core from 5.5.0 to 5.6.0 Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.5.0 to 5.6.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v5.5.0...v5.6.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump org.json:json from 20230618 to 20231013 Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20230618 to 20231013. - [Release notes](https://github.com/douglascrockford/JSON-java/releases) - [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md) - [Commits](https://github.com/douglascrockford/JSON-java/commits) --- updated-dependencies: - dependency-name: org.json:json dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump com.squareup.okhttp3:mockwebserver from 4.11.0 to 4.12.0 Bumps [com.squareup.okhttp3:mockwebserver](https://github.com/square/okhttp) from 4.11.0 to 4.12.0. - [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md) - [Commits](square/okhttp@parent-4.11.0...parent-4.12.0) --- updated-dependencies: - dependency-name: com.squareup.okhttp3:mockwebserver dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Hannes Achleitner <[email protected]>
When trying to build the project with gradle 8.0, and plugin version
0.1.5
, gradle throws following exception:The text was updated successfully, but these errors were encountered: