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

adapt file generation for compose fragments #542

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

josirichter
Copy link
Contributor

I've changed the file generation for compose fragments to include "Fragment" in the name. This. will allow for generating both the compose only and fragment setup if needed.

Copy link
Member

@gabrielittner gabrielittner left a comment

Choose a reason for hiding this comment

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

One small comment, otherwise looks good 👍

@@ -185,7 +185,7 @@ internal class FileGeneratorTestComposeFragment {

""".trimIndent()

test(data, "com/test/Test.kt", source, expected)
test(data, "com/test/FragmentTest.kt", source, expected)
Copy link
Member

Choose a reason for hiding this comment

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

This one should stay as Test.kt as it's the file name for the sources, not for the generated code. Same for the other tests below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I gotta say I'm confused, from what I see it uses the file name to find and read the generated file and compares its content to the expected string. When I didn't update it all the tests would fail as the files were not found. What did I get wrong here?

Copy link
Member

Choose a reason for hiding this comment

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

@josirichter josirichter merged commit 824c732 into main Sep 22, 2023
2 of 3 checks passed
@josirichter josirichter deleted the compose_fragment_naming branch September 22, 2023 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants