Slackbot
03/16/2022, 4:18 PMThomas Broyer
03/16/2022, 5:00 PMCristianGM
03/16/2022, 5:13 PMVampire
03/16/2022, 5:46 PMCristianGM
03/16/2022, 6:25 PMVampire
03/16/2022, 6:27 PMcompileOnlyApi
was introduced with 6.7 🙂melix
03/16/2022, 7:15 PMcompile
is totally unexpected for me, since it must not appear at runtimeVampire
03/16/2022, 7:20 PMmelix
03/16/2022, 10:44 PMVampire
03/17/2022, 12:21 AMcompile
scope, as it is then available at compile time of the consumer.
The alternative would be to have it e. g. optional
which then would mean it is not available to the consumer.
In most cases a superfluous dependency at runtime does not hurt, but a missing dependency at compile time makes compilation fail.
So to me this mapping the POM makes the closest sense given the limited possibilities.
So my plain gut-feeling guess is yes, it is intentional. 🙂melix
03/17/2022, 8:54 AMmelix
03/17/2022, 8:55 AMVampire
03/17/2022, 9:19 AMwithXml
then.Jendrik Johannes
03/17/2022, 10:58 AMcompileOnlyApi
but the general way how dependencies that end up only in the apiElements
variant (and not the runtimeElements
) are mapped. That was introduced long before 6.7 (5.x something I guess). compileOnlyApi was only added as convenience in 6.7 (you could easily add that yourself in earlier Gradle version).
I guess Gradle could introduce something in the pom mapping tom make this configurable when you configure the component. I think there is no universal “right way” to do it. POM is just too limited 😕melix
03/17/2022, 11:10 AMJendrik Johannes
03/17/2022, 11:13 AMmelix
03/17/2022, 11:38 AM