refactor(pitest-aggregator): replace cross-project access with variant-aware producer/consumer configurations#395
Conversation
|
I have no idea. |
…t-aware configurations
Thanks @Vampire! I’ve updated the aggregator to remove the cross‑project model access and rewrote it using proper variant‑aware aggregation, similar to what the test-report and Jacoco aggregation plugins do. Please review the latest changes. |
Nice
I'm sorry, but I don't currently have the capacity to review such a change in a project that I do not maintain and in a functionality that I do not use. Just one note as I specifically searched for it. |
…dling and atomic operations
|
Hi @szpak, I have already applied the changes based on the comments provided. Please review the changes. |
|
Not really, you added a rectifying comment instead of making it non-lenient. You should probably also not just fixedly depend on all subprojects, but have that at most as |
|
Hi @Vampire, I have already applied the changes based on the comments provided. Please review the changes. |
|
Still, I don't have time for a full review. But regarding the aggregation logic I had another cursory look, you still don't really do what I suggested.
Also Btw. you should not |
This PR refactors the
pitest-aggregatorplugin to support Gradle 9 and Configuration Cache requirements. It replaces the legacy cross-project model access (which broke project isolation) with Gradle's recommended Variant-Aware Dependency Management.Changes
1. Configuration Cache Compliance
2. Variant-Aware Architecture (Producer-Consumer)
Producer (
PitestPlugin): Now exposes three distinct outgoing configurations with specific attributes:pitestReportElements: Exposesmutations.xmlandlinecoverage.xml.pitestSourcesElements: Exposes source code directories.pitestClassesElements: Exposes compiled class directories.Consumer (
PitestAggregatorPlugin): UsesArtifactViewfor artifact consumption with variant selection:ProjectComponentIdentifier.Category.VERIFICATION,Usage.pitest, and specific artifact types.Shared Constants: Introduced
PitestAttributesto manage shared attribute keys and values, ensuring type safety between plugins.3. Report Generation Fixes
org.pitest:pitest-html-reportas a dependency in the aggregator. This fixes an issue where aggregated reports in multi-module projects were missing CSS styles and HTML resources.AggregateReportTaskcorrectly usingProviderconventions for lazy property evaluation.I’ve tested the changes, and they resolve the configuration‑cache serialization error. Builds now work correctly with the configuration cache enabled.
@szpak @Vampire please review the proposed changes.