ianbrandt
10/15/2024, 4:17 PMinternal
code in the 'main' source set, as is done automatically for the built-in 'test' source set). KGP now mutates the dependency configurations of associated compilations (e.g. integrationTestImplementation
, integrationTestCompileOnly
, integrationTestRuntimeOnly
) to add the corresponding dependencies from the associated-with compilation, which undermines DAGP's ability ascertain and thereby analyze the dependencies that were user-declared.
The corresponding issue, KT-70871, has been closed as "As Designed", but with no suggestion as to how the lost functionality could be restored given the new design, and follow-up questions asked after the ticket was closed have so far gone unanswered. I'm re-raising the issue here given 2.0.20 is no longer in EAP, and also for more targeted visibility.
I find the Dependency Analysis Gradle Plugin vital to maintaining correct dependency configurations at scale, and thereby to sustaining reliable builds for large, multi-module projects. Would someone at JetBrains consider re-opening KT-70871 to cover a different design for KGP's handling of associated compilations, or would anyone have an idea for how DAGP's functionality could be sensibly restored for Kotlin 2.0.20+ as is?tapchicoma
10/24/2024, 8:15 AMtapchicoma
12/20/2024, 4:05 PM-Xfriend-path
argument, so we could add some DSL for it in KGP
• I am looking on the way how DAGP could support KMP projects and associateWith
part which used widely in itianbrandt
01/14/2025, 8:43 PMtapchicoma
01/15/2025, 5:22 PM-Xfriend-path
support - Language design team first wants to redesign this compiler argument so no IDE or official DSL support in the nearest releases until this redesign will be done.
Overall it is being considered as internal compiler argument providing a workaround for main
-> test
sources visibility and that it should not be used outside 🤷♂️ianbrandt
03/01/2025, 1:23 AMianbrandt
03/06/2025, 4:54 PMtapchicoma
05/14/2025, 9:25 AM-Xfriends-path
- we've started the discussion how to approach it and we've have an prototype which avoids this argument. Now we want to verify this idea with a compiler team. Will update once we will have new information.ianbrandt
05/25/2025, 2:19 PM-Xfriend-path
related issues:
• https://youtrack.jetbrains.com/issue/KT-62687/Stabilize-friends-modules-compiler-argument
• https://youtrack.jetbrains.com/issue/KT-62688/Provide-a-Kotlin-plugin-DSL-to-configure-friend-modules
• https://youtrack.jetbrains.com/issue/KTIJ-31881/Support-Xfriend-path-compiler-argument-in-the-Kotlin-plugin