Skip to content

Move five kotlin-analysis-api dependencies to the version catalog - #3127

Merged
jaschdoc merged 2 commits into
google:mainfrom
KlyneChrysler:build/2968-catalog-08-kaa-misc
Aug 20, 2026
Merged

Move five kotlin-analysis-api dependencies to the version catalog#3127
jaschdoc merged 2 commits into
google:mainfrom
KlyneChrysler:build/2968-catalog-08-kaa-misc

Conversation

@KlyneChrysler

Copy link
Copy Markdown
Contributor

Continuing the inline build file versions for #2968, following #3105.

Five hardcoded dependency versions in kotlin-analysis-api move to catalog accessors: kotlinx-collections-immutable, caffeine, javaslang, javax.inject, and kotlin-reflect.

Verified that resolution is unchanged: ./gradlew :kotlin-analysis-api:dependencies output for the compile and runtime classpaths is identical before and after this commit, 156 lines compared. :kotlin-analysis-api:compileKotlin passes.

Continuing the inline versions for google#2968: kotlinx-collections-immutable,
caffeine, javaslang, javax.inject, and kotlin-reflect move from
hardcoded versions to catalog accessors.

@jaschdoc jaschdoc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. @hfmehmed, could you also take a look? Thanks! :)

Comment thread kotlin-analysis-api/build.gradle.kts Outdated
Comment thread kotlin-analysis-api/build.gradle.kts Outdated
@hfmehmed

Copy link
Copy Markdown
Collaborator

Sorry for the delay on this @KlyneChrysler . Thank you for doing this - can i ask you to also check if the 2 dependency i outlined are used.

@KlyneChrysler

Copy link
Copy Markdown
Contributor Author

javaslang has zero references anywhere in the repo so it can be dropped, and kotlin-reflect is used only by kotlin.reflect.full.isSubclassOf in the tests so it belongs on testImplementation, both verified by compiling main and tests with javaslang removed and kotlin-reflect moved to test.

@jaschdoc jaschdoc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I think removing the kotlin-reflect dependency might also solve a few issues users have with conflicting class paths, although I'm not sure about that. In any case, it's good to remove unused dependencies. I'm worried, however, that these dependencies are inherited from Kotlin/AA. Let's try to remove the dependencies and see what happens. :)

EDIT: I cannot find any reference to javaslang in the Kotlin repo either.

Per review: both are unused as explicit declarations. javaslang has no
references anywhere in the repo, and kotlin.reflect.full is used only in
tests but resolves transitively from Kotlin/Analysis-API. main and test
both compile with the two declarations removed, so they are dropped
rather than added to the catalog.
@KlyneChrysler

Copy link
Copy Markdown
Contributor Author

Done, removed both entirely rather than cataloging them. You were right that they are inherited from Kotlin/Analysis-API: main and the tests both still compile with the two explicit declarations gone, and the test's kotlin.reflect.full.isSubclassOf resolves transitively. Left it to CI to confirm the full suite.

@hfmehmed

Copy link
Copy Markdown
Collaborator

@jaschdoc please review again and merge if all good from your end

@jaschdoc jaschdoc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updating the PR. Looks good :)

@jaschdoc
jaschdoc merged commit 2effd11 into google:main Aug 20, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants