Repository navigation
ADFA-6110: Apply IDE sub-plugins only to Android application modules - #2304
Open
itsaky-adfa wants to merge 1 commit into
Open
itsaky-adfa wants to merge 1 commit into
itsaky-adfa wants to merge 1 commit into
Conversation
The init script applies AndroidIDEGradlePlugin to every subproject of every build, including included builds such as a build-logic java-library. Gradle decorates a plugin class before calling apply(), resolving every type in its method signatures, compiled lambdas included. LogSender, Jdwp, Profiler and QuickBuild all carry AGP types there, so on a project without AGP the build failed with "Could not generate a decorated class ... com/android/build/..." before each sub-plugin's own APP_PLUGIN guard could decline. Gate all four in AndroidIDEGradlePlugin on hasPlugin(APP_PLUGIN). Each sub-plugin already returned early without it, so app modules are unaffected. Loading the classes by name (Class.forName) does not help: decoration happens either way, and the new test fails with it. Tests: a parameterized case per sub-plugin on a java-library in an included build (fails on all four without the gate), and a Profiler case on :app (fails if the gate never opens). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JULeV2jMSV6tkuLknMpc89
|
To enable Code Reviewer, link your GitHub account to your Atlassian account. This is a one-time task that takes less than a minute. Once your account is linked, resubmit the pull request to trigger a code review. |
itsaky-adfa
marked this pull request as ready for review
November 25, 2026 04:08
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Contributor
Daniel-ADFA
approved these changes
Nov 25, 2026
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.
ADFA-6110
Sync failed on any project whose included build has a non-Android module (e.g. CoGo's own
build-logic):Could not generate a decorated class for type LogSenderPlugin.Cause: Gradle builds a subclass of a plugin before calling
apply(), which loads every AGP type in the plugin's method signatures. LogSender, JDWP, Profiler and Quick Build all have AGP types there, so they fail on modules without AGP before their own "not an app" check runs.Fix:
AndroidIDEGradlePluginapplies these four only to modules withcom.android.application. App modules behave as before. Loading them by name (Class.forName) was tried and does not help.Tests:
java-libraryin an included build. All four fail without the fix.:app. Fails if the new check never lets plugins through.Not covered: applying
com.itsaky.androidide.logsenderdirectly to a non-Android module still fails, as it did before this change.