Is there a way to write tests to prove that only the api configuration is exposed to consuming projects, and that the implementation configuration jars are not leaked?
Martin d'Anjou
05/05/2022, 8:23 PM
I guess it is not possible since the test classpaths always contain both the api and the implementation configurations:
v
Vampire
05/05/2022, 8:51 PM
Why do you want to test that Gradle works as expected?
Or what is your intention?
m
Martin d'Anjou
05/05/2022, 8:55 PM
I am having a hard time trying to find a way to test that I only declare what's needed for the api configuration so only the intended classes are exposed to consumers and no more. I thought I'd write a test that only had "api" and not "implementation", but I am not finding a way to do that, and the diagram says that too. To have a test with just the the api classes, it's not possible (have to get implementation too).