About compile and implementation (again)

This thought struck me today. Everyone is supposed to move to use the implementation configuration, but what is sourceSets.main.compileConfigurationName still return compile.

This makes it difficult if you want to do something like

configurations.getByName( sourceSets.main.compileConfigurationName ).extendsFrom(
   configurations.getByName('myConfiguration')
)

What’s difficult about this? The compile configuration is deprecated. The compileConfigurationName property is literally the name of the compile configuration. The compile configuration name isn’t now implementation. It’s an entirely new configuration. The compileConfigurationName property is also deprecated. This code should move to use the implementation equivalent just like everything else:

configurations.getByName( sourceSets.main.implementationConfigurationName ).extendsFrom(
   configurations.getByName('myConfiguration')
)

:man_facepalming: You’re right, I never looked properly at the API and that (not-so) new method and it has been there since 3.4!