I was reviewing configurations for a large, multi-module project and noticed something strange - the compile configuration often has more dependencies than compileClasspath. These are not direct dependencies - they are transitive. The code in the projects makes no direct reference to the missing dependencies, but some are definitely needed because intermediate classes use them.
I’m confused how this could happen in a “normal” project. Looking at JavaBasePlugin.defineConfigurationsForSourceSet in gradle 5.6.x for how the default configurations for a java project are hooked together I see:
compileClasspath <- implementation <- compile
(compileClasspath also extends from compileOnly, but I don’t care about that right now)
Given this, how is it possible that compile has things that compileClasspath does not? Does it have something to do with the various attributes that are set on compileClasspath?