Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle ClassCastException for ComposeMultiplatformBuildService in Compose Gradle plugin #3467

Merged
merged 2 commits into from
Aug 8, 2023

Conversation

eymar
Copy link
Collaborator

@eymar eymar commented Aug 7, 2023

ClassCastException might occur when our gradle plugin was loaded more than once. See #3459

We throw another exception with a bit more clear message.

…pose Gradle plugin

ClassCastException might occur when our gradle plugin was loaded more than once.  See #3459

We throw another exception with a bit more clear message.
throw IllegalStateException(
"Failed to get ComposeMultiplatformBuildService instance." +
" Compose Gradle plugin was probably loaded more than once." +
" Consider declaring it in the root build.gradle.kts. Original exception message: ${e.message}",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure "Original exception message" is necessary.
--stacktrace or --full-stacktrace will print the nested exception.

@eymar eymar merged commit e888495 into master Aug 8, 2023
3 checks passed
@eymar eymar deleted the catch_class_cast_in_gradle_plugin branch August 8, 2023 12:21
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.

None yet

2 participants