build: centralize plugin classpaths in a hedvig.settings convention plugin - #3055
Open
StylianosGakis wants to merge 2 commits into
Open
build: centralize plugin classpaths in a hedvig.settings convention plugin#3055StylianosGakis wants to merge 2 commits into
StylianosGakis wants to merge 2 commits into
Conversation
…lugin
Move the build's plugin classpath into build-logic and apply it from the settings
script, so plugin versions live only in gradle/libs.versions.toml.
Applying a build-logic plugin from settings.gradle.kts puts build-logic's whole plugin
classpath on the settings classloader, which is the parent of every project's
classloader. That is what lets project build scripts apply plugins by id without a
version. A settings `plugins {}` block cannot do this itself: it has no version-catalog
accessors and accepts only literals, which would mean duplicating every plugin version.
- New precompiled settings plugin `hedvig.settings` (applies develocity).
- build-logic declares every build plugin as `implementation` rather than `compileOnly`,
so the plugins live on its classloader and its own handler code (ApolloHandler,
ComposeHandler, ...) can reference their types at runtime. New build plugins go in
that one list.
- Kotlin compiler plugins (ksp, metro, kmpNativeCoroutines) must share a classloader
with the Kotlin plugin. KSP2's analysis worker fails with PROCESSING_ERROR when split
from it, so they are declared alongside AGP/KGP here.
- Root build.gradle.kts drops the versioned `apply false` list and now declares only the
plugins applied to the root project itself (dependencyAnalysis, doctor).
`hedvig.gradle.plugin` needed no declaration: it is a build-logic plugin already
available via includeBuild.
- Module scripts that applied these plugins by `alias(...)` now use version-less `id(...)`.
No behaviour change intended: same plugins, same versions, different classpath ownership.
Verified: :app debug/staging/release, :design-showcase, design-showcase-desktop,
hedvig-lint, :umbrella iosArm64/jvm, `test jvmTest` (608 test executions across the 14
test-bearing library modules, none skipped) and `lint` all pass.
Everything below the divider comment is a Gradle plugin artifact, everything above is a normal dependency. Moves firebase-crashlytics-buildtools up into the alphabetical libraries where it belongs, moves the lint/workaround entries above the divider, sorts the plugin artifacts, and replaces the two overlapping comments with one short one.
StylianosGakis
marked this pull request as ready for review
August 14, 2026 08:42
StylianosGakis
force-pushed
the
chore/gradle-plugin-cleanup
branch
from
August 14, 2026 08:54
5319ef5 to
df0c89c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a11y