Conversation
- Upgrades to spotless 8.2.1 - Moves spotless setup from an init.gradle.kts to build-logic - Narrows down the scope of `target` in spotless configuration to be more precise to workaround diffplug/spotless#2717 - Updates all references to init.gradle.kts Ran gradle-profiler ./gradlew build --dry-run to validate performance impact. Before PR: Mean 10,527.96 ms with 289.01 ms std dev After PR: Mean 11,251.78 ms with 530.29 ms std dev Regression is there, but quite minor. Test: ./gradlew spotlessCheck
Summary of ChangesHello @liutikas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors the project's code formatting setup by integrating the Spotless plugin directly into the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request is a great improvement, refactoring the Spotless configuration from a Gradle init script into the build-logic convention plugins. This enhances the project's structure and maintainability. The dependency updates and removal of the old init script are all handled correctly. I've added a few suggestions to remove some unused imports and to make the new Spotless configuration more robust by enforcing that all formatted files end with a newline.
build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/KotlinAndroid.kt
Outdated
Show resolved
Hide resolved
build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/KotlinAndroid.kt
Outdated
Show resolved
Hide resolved
build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Spotless.kt
Show resolved
Hide resolved
build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/Spotless.kt
Show resolved
Hide resolved
|
Hi @liutikas, can you add this issue as fixed in your PR? Also, I was wondering if is there was a specific reason to move the One last thing to note here also is that spotless is sadly not run on the build-logic project itself :/ |
dturner
left a comment
There was a problem hiding this comment.
Thanks for doing this. One very minor suggestion.
f2525b0 to
f208b45
Compare
Added to the PR message
Init scripts are burdensome to invoke and now that spotless is CC compatible the need to have it spit out is no longer there.
Fixed, now root project validates build-logic sources. |
f208b45 to
3ddc18c
Compare
|
Hello! I'm confused how this PR actually introduces a slight regression. is this due to the move to build-logic? |
targetin spotless configuration to be more precise to workaround Reduce performance overhead diffplug/spotless#2717Ran gradle-profiler ./gradlew build --dry-run to validate performance impact.
Before PR:
Mean 10,527.96 ms with 289.01 ms std dev
After PR:
Mean 11,251.78 ms with 530.29 ms std dev
Regression is there, but quite minor.
Test: ./gradlew spotlessCheck
Fixes #1832