Skip to content

Conversation

@hfmehmed
Copy link
Collaborator

@hfmehmed hfmehmed commented Jan 8, 2026

When applying settings plugins (that come from composite gradle build), some classloader change leads to "com.android.base" plugin not being detected as applied by Gradle, leading to problems.

When using the plugins.withType(Class) API this works, however now we face a Class not found error if the AGP plugin is not applied. So everything is wrapped in a try catch block.

@hfmehmed hfmehmed requested a review from ting-yuan January 8, 2026 16:32
decorateAndroidExtension(project, onSourceSet)
}
} catch (e: Throwable) {
// Android plugin not found, ignore
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is too broad and may bite us in the future. Is it feasible to catch the specific exception type and make sure it is because of AndroidBasePlugin?

@hfmehmed hfmehmed force-pushed the fix-agp-detection-2 branch from 817b99a to 568ce93 Compare January 9, 2026 10:20
@hfmehmed
Copy link
Collaborator Author

hfmehmed commented Jan 9, 2026

Actually i am still unconvinced we should do this. Lets wait until i get more clarity what is happening here

@hfmehmed hfmehmed closed this Jan 9, 2026
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.

2 participants