Skip to content

Conversation

@jesswrd
Copy link
Contributor

@jesswrd jesswrd commented Feb 3, 2026

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

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@jesswrd jesswrd requested review from a team and sfshaza2 as code owners February 3, 2026 21:30
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Java Version Update: The documentation now specifies Java 17 as the minimum sourceCompatibility and targetCompatibility for Android add-to-app projects, aligning with current Flutter requirements.
  • Documentation Clarity: Several instructions have been refined for better clarity, including specifying modifications for the 'host Android app' and improving the explanation of repository paths.
  • Placeholder Consistency: Repository URL placeholders have been updated to use angle brackets (e.g., <some/path>) to clearly indicate they are values to be replaced by the user.

🧠 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
  • src/content/add-to-app/android/project-setup.md
    • Updated Java sourceCompatibility and targetCompatibility from 11 to JavaVersion.VERSION_17 in build.gradle examples.
    • Added clarification 'to your host app' for instructions on modifying the host Android app.
    • Modified the placeholder for the Flutter module repository URL from "some/path/flutter_module/build/host/outputs/repo" to "<some/path/flutter_module>/build/host/outputs/repo".
    • Changed 'Android project's app/build.gradle file' to 'host app's app/build.gradle file' for improved precision.
    • Refined the explanation for the profileImplementation dependency configuration.
    • Updated the placeholder for the Flutter module project repository URL in settings.gradle.kts to use angle brackets.
Activity
  • No human activity (comments, reviews, etc.) has been recorded for this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

Comment on lines +404 to 415
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")
}
}
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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")
}
}

@flutter-website-bot
Copy link
Collaborator

Visit the preview URL for this PR (updated for commit 80cdf31):

https://flutter-docs-prod--pr13023-update-add-to-app-docs-d1shzqbv.web.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants