-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Update Add To App Setup Docs #13023
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?
Update Add To App Setup Docs #13023
Conversation
Summary of ChangesHello @jesswrd, 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 updates the Android project setup documentation for Flutter's add-to-app feature. The primary goal is to ensure the instructions reflect the latest Flutter compatibility requirements, specifically by mandating Java 17 for compilation. Additionally, the changes aim to enhance the overall clarity and accuracy of the setup guide, addressing common pain points encountered during the integration process. 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. Changelog
Activity
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 updates the 'Add to App' documentation for Android. The changes include updating the Java compile options to Java 17, which is now the minimum required version, and several clarifications to make the instructions easier to follow. For example, placeholder paths are now correctly marked, and references to the 'host app' are more consistent. I've found one area where the provided code snippet could be misleading and lead to build errors for users. My suggestion provides a more complete and correct example.
| Then, add the following `dependencyResolutionManagement` block to the | ||
| `settings.gradle` file: | ||
| ```kotlin title="MyApp/settings.gradle.kts" | ||
| include(":app") | ||
|
|
||
| dependencyResolutionManagement { | ||
| repositories { | ||
| maven(url = "https://storage.googleapis.com/download.flutter.io") | ||
| maven(url = "some/path/flutter_module_project/build/host/outputs/repo") | ||
| maven(url = "<some/path/flutter_module_project>/build/host/outputs/repo") | ||
| } | ||
| } | ||
| ``` |
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 provided code snippet for settings.gradle.kts is incomplete and could be misleading for users. It's missing repositoriesMode, google(), and mavenCentral(), which are typically required. A user copying this block as-is might break their build. The instructions should guide the user to add the new repository to their existing dependencyResolutionManagement block, rather than adding a new, incomplete block. The suggested change provides a more complete and robust example.
| Then, add the following `dependencyResolutionManagement` block to the | |
| `settings.gradle` file: | |
| ```kotlin title="MyApp/settings.gradle.kts" | |
| include(":app") | |
| dependencyResolutionManagement { | |
| repositories { | |
| maven(url = "https://storage.googleapis.com/download.flutter.io") | |
| maven(url = "some/path/flutter_module_project/build/host/outputs/repo") | |
| maven(url = "<some/path/flutter_module_project>/build/host/outputs/repo") | |
| } | |
| } | |
| ``` | |
| Then, update the `dependencyResolutionManagement` block in your `settings.gradle.kts` file to add the local Maven repository for your Flutter module: | |
| ```kotlin title="MyApp/settings.gradle.kts" | |
| dependencyResolutionManagement { | |
| repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) | |
| repositories { | |
| google() | |
| mavenCentral() | |
| maven(url = "https://storage.googleapis.com/download.flutter.io") | |
| maven(url = "<some/path/flutter_module_project>/build/host/outputs/repo") | |
| } | |
| } |
|
Visit the preview URL for this PR (updated for commit 80cdf31): https://flutter-docs-prod--pr13023-update-add-to-app-docs-d1shzqbv.web.app |
Updated the Java compile configurations to Java 17 to align with current Flutter minimums. Add-to-app will not work unless the compiler options are changed to Java 17. I also fixed some pain points I had when going through these instructions myself.
Issues fixed by this PR (if any):
PRs or commits this PR depends on (if any):
Does not depend on PR or commits.
Presubmit checklist
of 80 characters or fewer.