Status Update
Comments
ls...@google.com <ls...@google.com>
je...@google.com <je...@google.com>
zo...@gmail.com <zo...@gmail.com> #2
This also appears to be happening in AGP 8.2.0-beta02, FWIW. edit: also in 8.2.0-beta03.
zo...@gmail.com <zo...@gmail.com> #3
I checked AGP 8.2.0-rc02, same issue. AGP 8.1.2 does work, which makes sense - something in AGP 8.2.0 changed this behavior.
I also updated the repo to use JaCoCo 0.8.11 that was released recently - no change in behavior here.
cm...@google.com <cm...@google.com> #4
Apologies for the delay in looking at this
This looks like this regressed in
Although it also looks like the version used for reporting can be overridden by the android DSL, which means they can diverge which could cause problems
Options I can think of:
- Revert to respecting the jacoco plugin version for unit tests: set the version in the jacoco plugin extension to the AGP default on plugin apply (to allow it to be overridden in the build script), and use the version from that extension for unit test running and reporting (i.e. allowing the unit test version to be different from the androidTest version, will need an additional configuration for it if the versions are different)
- Perhaps setting this in AGPs DSL should override both versions, rather than just controlling the androidTest version as it does currently. That's a more difficult semantic change and might make sense to do as a follow up later.
- Use the android.testCoverage.jacocoVersion for both unitTest and androidTest (I think i prefer the first option though, as there are valid reasons for using different versions)
We should consider this for 8.3
cm...@google.com <cm...@google.com> #5
Micah, would you be able to look at this, I'm probably not going to get a chance this week?
mi...@google.com <mi...@google.com>
mi...@google.com <mi...@google.com> #6
Submitted the fix for this issue.
Once the change rolls out, the Jacoco version for unit test (testing and reporting) can be set with the following options, in the following order from highest to lowest precedence:
- Gradle property: com.android.test.jacocoVersion
- Android DSL: android.testCoverage.jacocoVersion
- Jacoco DSL: jacoco.toolVersion (this is what you are using currently)
When none are specified, the default version will be used, which is Jacoco version 0.8.8 currently.
zo...@gmail.com <zo...@gmail.com> #7
Do you have an expected AGP alpha/beta/rc/release version this is targeted for? I will try it out as soon as it's available with my sample app!
mi...@google.com <mi...@google.com> #8
It should be released starting with AGP 8.4 Canary 3.
pa...@gmail.com <pa...@gmail.com> #9
Does this mean that those who are on stable versions, will not be able to specify a Jacoco between 8.2.0 <= and < 8.4.0?
mi...@google.com <mi...@google.com> #10
Yes, unfortunately. But this is only for the Unit Test workflow. The Jacoco reporting will still be configurable in those versions with android.testCoverage.jacocoVersion
.
pa...@gmail.com <pa...@gmail.com> #11
What do you mean by unit test workflow?
Also the issue was/is tagged blocking 8.3 RC, could it be backported?
mi...@google.com <mi...@google.com> #12
I mean for unit test rather than android test. It cannot be backported anymore to 8.3.
an...@google.com <an...@google.com> #13
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Jellyfish | 2023.3.1 Canary 3
- Android Gradle Plugin 8.4.0-alpha03
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
zo...@gmail.com <zo...@gmail.com> #14
Thank you! :bow:
mi...@google.com <mi...@google.com> #15
Hi, update here. I was able to cherry pick this fix, so it will be available in 8.3.
pa...@gmail.com <pa...@gmail.com> #16
Awesome 😎!
an...@google.com <an...@google.com> #17
The fixes for this issue are now also available in:
- Android Studio Iguana | 2023.2.1 Beta 2
- Android Gradle Plugin 8.3.0-beta02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
an...@google.com <an...@google.com> #18
The fixes for this issue are now also available in:
- Android Studio Hedgehog | 2023.1.1 Patch 2
- Android Gradle Plugin 8.2.2
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
ji...@gmail.com <ji...@gmail.com> #19
- Android Studio Hedgehog | 2023.1.1 Patch 2
- Android Gradle Plugin 8.2.2
The Jacoco plugin extension version '0.8.9' is not currently available in the Android Gradle Plugin. Setting the version to 0.8.8
ro...@gmail.com <ro...@gmail.com> #20
Now we have the following issue:
- Android Studio Iguana | 2023.2.1 Beta 2
- Android Gradle Plugin 8.2.2
The Jacoco plugin extension version '0.8.9' is not currently available in the Android Gradle Plugin. Setting the version to 0.8.8
ge...@amazon.com <ge...@amazon.com> #23
Android Studio Iguana | 2023.2.1 Beta 2
Android Gradle Plugin 8.3.0-beta02
and I'm still seeing the error:
The Jacoco plugin extension version '0.8.9' is not currently available in the Android Gradle Plugin. Setting the version to 0.8.8
mi...@google.com <mi...@google.com> #24
Hi, thank you for the update. For the specific warning you are seeing, this has not been resolved until AGP 8.4. It should be available in any versions of 8.4.
Description
Setting JaCoCo version, done via:
```
jacoco {
toolVersion = '0.8.10'
}
```
No longer has any effect when using AGP 8.2.0.
STEPS TO REPRODUCE:
1. Clone/pull down
2. Run `jacocoTestReport` on main branch
3. Run `jacocoTestReport` on agp-8-2-0 branch
ATTACH SCREENSHOTS/RECORDINGS OF THE ISSUE
1. main branch JaCoCo output showing `0.8.10` as JaCoCo version
2. agp-8-2-0 branch JacoCo output showing `0.8.8` as JaCoCo version
ATTACH LOG FILES (Select Help > Show Log in Files, or Show Log in Finder on a Mac)
N/A
------------------
IMPORTANT: Please read
all required information.
------------------
Studio Build: Android Studio Hedgehog | 2023.1.1 Beta 1 / AI-231.9392.1.2311.10680768
Version of Gradle Plugin: 8.2.0-beta01
Version of Gradle: 8.2
Version of Java: 17 (Eclipse Temurin 17.0.8)
OS: MacOS Monterey 12.6.8