The archives configuration has been deprecated for dependency declaration

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.

Deperecation happens in the BasePlugin and in favour of the JavaPlugins compile_classpath and implementation configuration. My project however, does not implement the Java/ApplicationPlugin isn’t it strange to generally deprecate the collections, eventhough they are part of the “general purpose” BasePlugin? Thanks.

archivesConfiguration.deprecateForDeclaration(JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME, JavaPlugin.API_CONFIGURATION_NAME);