-
Notifications
You must be signed in to change notification settings - Fork 223
Refactor common build logic into a set of Gradle plugins #173
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
base: main
Are you sure you want to change the base?
Conversation
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 refactors the project's Gradle build system by extracting common Android build configurations into a set of reusable custom Gradle plugins. This change significantly reduces boilerplate code in individual module Highlights
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request does an excellent job of refactoring common Gradle build logic into a set of convention plugins. This greatly reduces code duplication across the various build.gradle.kts files and improves the overall maintainability of the build process. The new build-plugin module is well-structured. I've identified a couple of minor omissions in the new plugins that should be addressed to ensure build configurations remain consistent with their state before this refactoring. Overall, this is a solid improvement.
...-plugin/src/main/kotlin/com/android/developers/androidify/plugin/AndroidApplicationPlugin.kt
Show resolved
Hide resolved
build-plugin/src/main/kotlin/com/android/developers/androidify/plugin/AndroidLibraryPlugin.kt
Outdated
Show resolved
Hide resolved
Creates androidify.applicationPlugin, androidify.libraryPlugin, and androidify.composeLibraryPlugin that picks up common logic from build.gradle.kts files and reduces duplication it build logic Test: ./gradlew testDebugUnitTest -x app:testDebugUnitTest
a16519b to
bb6f71e
Compare
build-plugin/src/main/kotlin/com/android/developers/androidify/plugin/AndroidLibraryPlugin.kt
Outdated
Show resolved
Hide resolved
|
|
||
| android { | ||
| compileSdk { | ||
| version = release(36) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to pull these numbers from libs.versions.toml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole point of declaring compileSdk (and minSdk and targetSdk) in settings.gradle is so that it does not need to be set in each subproject, so there's no need to put the values in the catalog file.
Creates androidify.applicationPlugin, androidify.libraryPlugin, and androidify.composeLibraryPlugin that picks up common logic from build.gradle.kts files and reduces duplication it build logic
Test: ./gradlew testDebugUnitTest -x app:testDebugUnitTest
Fixes #172