Commit 45061b3
Fix Java coverage support on Windows by adding coverage_main_class to launch_info (#311)
### Summary
This PR enables Java code coverage to work properly on Windows by adding the `coverage_main_class` to the `launch_info` metadata in `bazel_java_binary.bzl`. Without this addition, Bazel fails to properly instrument and run Java binaries with coverage enabled on Windows platforms.
### Changes
- Added `coverage_main_class` to `launch_info` in `bazel_java_binary.bzl` to explicitly define the main class used during coverage runs.
### Motivation
- Before this fix, attempts to run Java coverage tests on Windows would not produce proper coverage output.
- This is a step toward resolving [bazelbuild/bazel#18839](bazelbuild/bazel#18839).
Closes #311
COPYBARA_INTEGRATE_REVIEW=#311 from KrishnaM256:master 78942a2
PiperOrigin-RevId: 792108185
Change-Id: Ia29301538eaa3f7ca1195230abb32536dbe52e4f1 parent c0462f0 commit 45061b3
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
287 | 289 | | |
288 | 290 | | |
289 | 291 | | |
| |||
0 commit comments