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

Respect dagger.formatGeneratedSource in AndroidProcessor #3532

Closed
wants to merge 1 commit into from

Conversation

ZacSweers
Copy link

Resolves #3531

@@ -53,10 +53,17 @@
public final class AndroidProcessor extends BasicAnnotationProcessor {
private static final String FLAG_EXPERIMENTAL_USE_STRING_KEYS =
"dagger.android.experimentalUseStringKeys";
private static final String FLAG_FORMAT_GENERATED_SOURCES =
"dagger.formatGeneratedSource";
Copy link
Member

Choose a reason for hiding this comment

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

I just noticed that this is reading a Dagger flag from Dagger Android. While not the worst thing, it is something I think we want to try to avoid as we try to keep them as separate as possible. I'm thinking of instead just removing the formatting entirely, especially since in Hilt we don't try to format our generated sources at all. Would this satisfy your use case? I assume you want this flag just to turn it off entirely?

Copy link
Author

Choose a reason for hiding this comment

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

That works for me!

@ZacSweers ZacSweers closed this Aug 18, 2022
@ZacSweers ZacSweers deleted the z/formattingFilterAndroid branch August 18, 2022 21:34
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.

dagger-android-processor still always enables formatting
2 participants