Skip to content

Also fix versionName in example build.gradle.kts#13203

Open
solsticedhiver wants to merge 3 commits intoflutter:mainfrom
solsticedhiver:patch-1
Open

Also fix versionName in example build.gradle.kts#13203
solsticedhiver wants to merge 3 commits intoflutter:mainfrom
solsticedhiver:patch-1

Conversation

@solsticedhiver
Copy link

@solsticedhiver solsticedhiver commented Mar 21, 2026

There is a call to .toInteger() on flutter.versionCode in the example of build.gradle.kts

This does not seem right because that change throws an error when trying to build the app with that change.

Note: There is no such a call to .toInteger() with the build.gradle.kts created with flutter for a brand new app

Description of what this PR is changing or adding, and why:
Remove a call to to toInteger() for flutter.versionCode because it throws an error when building and does not seem necessary (builds fine without)

Issues fixed by this PR (if any):
See above

PRs or commits this PR depends on (if any):

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.

There is a call to .toInteger() on flutter.versionCode in the example of build.gradle.kts

This does not seem right because that change throws an error when trying to build the app with that change.

Note: I don't see such a call to .toInterger() with the build.gradle.kts created with flutter for a brand new app
@solsticedhiver solsticedhiver requested review from a team and sfshaza2 as code owners March 21, 2026 14:34
@google-cla
Copy link

google-cla bot commented Mar 21, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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 correctly fixes an issue in the Android deployment documentation where a code example for build.gradle.kts used invalid Groovy syntax (.toInteger()) within a Kotlin script context. The change removes this incorrect method call. My review includes a suggestion to further improve the example for consistency by using properties from the flutter Gradle extension, which aligns with other parts of the same code snippet and modern Flutter project configurations.

@solsticedhiver
Copy link
Author

Oops I have signed the CLA after clicking the button. should be ok now

solsticedhiver and others added 2 commits March 21, 2026 15:50
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@solsticedhiver solsticedhiver changed the title Fix versionCode in example build.gradle.kts Also fix versionName in example build.gradle.kts Mar 21, 2026
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.

1 participant