Quadrant
Quadrant copied to clipboard
Support package namespace when generating QuadrantConstants
Draft proposal to support package namespace with Quadrant. For discussion, check #5.
When generating constants, Quadrant would respect the package namespace generating full qualified constant names: com.gaelmarhic.quadrant.ModuleOneFirstActivity
-> com_gaelmarhic_quadrant_ModuleTwoSecondActivity
. Now, quadrant completely remove the package namespace and generate a single name as: "MODULE_ONE_FIRST_ACTIVITY" which might cause package conflicts.
The code here already generate the proposed format but I will be waiting @gaelmarhic buy-in before adding more tests for the new case as there are few questions that need to be answered (what would be the format of those package namespace names? should we keep the backward compatibility or not? etc).
Fix #5
Thanks so much for this PR @marcellogalhardo. Please, see the discussion in the corresponding issue: #5.
@marcellogalhardo, as discussed in #5 , let's move forward with your idea.
Here are a few things I'd like to ask you to do:
- As commented in the issue, make this behaviour false by default.
- Add 2 tests. One in the
PerModule
and one in theNotPerModule
nested classes. Those tests should be similar but I'd like to test it in both cases. Quadrant's default behaviour is already highly covered. In those 2 tests you'd only need to test the new behaviour: per module, and not per module. - Update the README, adding a new section, where you would: explain the new feature, explain how to enable it, as well as explain a good practice of using aliases.
Be aware that this PR will conflict with #8, where QuadrantConfigurationExtension
was slightly modified.
Thanks again for your contribution @marcellogalhardo ! :)