-
-
Notifications
You must be signed in to change notification settings - Fork 185
Description
Spotless not applied to feature modules (feature:home, feature:details)
Hi! First of all, thank you for this amazing project π
Iβve been studying this project in detail and learning a lot from it, and while looking into the build setup, I noticed something I wanted to clarify regarding the Spotless configuration.
Background
I noticed that the following feature modules do not have the Spotless plugin applied, while all other modules in the project do.
I wanted to check whether this was intentional or possibly an oversight.
What I found
Modules WITH Spotless
- β
All
coremodules
(database,network,model,data,designsystem, etc.) - β
appmodule - β
baselineprofilemodule
Modules WITHOUT Spotless
- β
feature:home - β
feature:details
My guess
While looking through the commit history, I found the following sequence:
- 6db3f88
(May 8, 2024)- Feature modules did have Spotless when
AndroidFeatureConventionPluginwas introduced
- Feature modules did have Spotless when
- 33badee
(same day, ~13 minutes later)- Spotless was removed from feature modules during the AGP 8.4 upgrade
- e507073
(May 16, 2024)- Spotless configuration was fixed by adding
ktlint_function_naming_ignore_when_annotated_with=Composable
- Spotless configuration was fixed by adding
It looks like Spotless might have been temporarily removed from feature modules to address a build issue during the AGP upgrade, and possibly wasnβt added back after the configuration was fixed.
That said, I could be completely wrong π
Question
- Is there a specific reason why feature modules should not use Spotless?
- Or would it be okay to add it back for consistency with the rest of the project?
Local test results
I tested this locally by adding:
id("skydoves.pokedex.spotless")to both feature modules.
After fixing one line-length issue in OnetimeStateIn.kt, everything worked as expected:
- β
./gradlew :feature:home:spotlessCheck :feature:details:spotlessCheckpasses - β
./gradlew assembleDebugsucceeds
Offer
If this was unintentional, Iβd be happy to submit a PR to add Spotless back to the feature modules.
Thanks again for the great work on this project! π