autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

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

Open
#1,802 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Kotlin
Stars
2.2k
Forks
158
Avg merge
16h 25m
Merged PRs (30d)
46

Description

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!

Contributor guide

Open the contributing guide

Research direction

Start by reviewing PR #1719 and the code that creates dependencyAnalysisKotlinMetadataClasspath and performs Kotlin metadata processing. Determine how non-Kotlin Java/Groovy projects can avoid resolving kotlin-metadata-jvm while preserving Kotlin analysis, then verify that the dependency is absent for those projects and still available when Kotlin support is needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.