Skip to content

Allow disabling kotlin-metadata-jvm dependency / Kotlin metadata analysis #1802

Description

@robotfooder

Plugin version
3.18.0

Gradle version
9.6.1

JDK version
21

Hi,
First of all, thank you for maintaining this plugin. We're using it across a large number of Gradle projects and have been very happy with it.
After upgrading from 3.17.0 to 3.18.0 we noticed that the plugin now creates the configuration:
dependencyAnalysisKotlinMetadataClasspath
which resolves:
org.jetbrains.kotlin:kotlin-metadata-jvm
Based on PR #1719, this appears to be used by classloader-isolated workers for Kotlin metadata processing.
Our use case is that we only analyze Java/Groovy projects and do not use Kotlin sources. Because of internal dependency governance requirements, the introduction of a Kotlin artifact in the build tool dependency graph prevents us from upgrading beyond 3.17.0.
Would it be possible to:

  1. Make Kotlin metadata analysis optional, or
  2. Lazily create/resolve dependencyAnalysisKotlinMetadataClasspath only when Kotlin support is actually needed, or
  3. Provide a feature flag to disable Kotlin metadata processing entirely?

We would be happy to continue upgrading the plugin if there were a way to avoid resolving org.jetbrains.kotlin:kotlin-metadata-jvm for non-Kotlin projects.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions