I would like to use the BasePlugin’s “archives” configuration, because it specifically fits my use case, collecting all archive artifacts from any of my subprojects. However when doing:
project.subprojects {
afterEvaluate { subproject ->
if (GradleHelper.hasConfiguration(subproject, Dependency.ARCHIVES_CONFIGURATION)) {
project.dependencies.add(Dependency.ARCHIVES_CONFIGURATION, subproject).targetConfiguration = Dependency.ARCHIVES_CONFIGURATION
}
}
}
I get a deprecation warning:
The archives configuration has been deprecated for dependency declaration. This will fail with an error in Gradle 8.0. Please use the implementation or api configuration instead. Consult the upgrading guide for further information: Upgrading your build from Gradle 5.x to 6.0
This has been noticed (rarely?) before: Archives configuration has been deprecated for dependency declaration. · Issue #1407 · gradle/kotlin-dsl-samples · GitHub
Is this deprecation warning intended, because the upgrading guide doesn’t mention this use case explicitely? Thanks.