Skip to content

Conversation

@sfshaza2
Copy link
Contributor

@sfshaza2 sfshaza2 commented Apr 6, 2023

This PR supercedes PR #8490.

Staged here:
main page: https://parlough-android-flutter.web.app/
migration page: https://parlough-android-flutter.web.app/release/breaking-changes/android-java-gradle-migration-guide
the "go" link: https://parlough-android-flutter.web.app/go/android-java-gradle-error

(This is the staged go link. The actual go link will be docs.flutter.dev rather than parlough-android-flutter.web.app.)

@reidbaker @camsim99 @mariamhas @ericwindmill @redbrogdon @timsneath

@khanhnwin
Copy link
Contributor

Dropping my ping to shams here for reference -- It looks like the image urls on this staging link is referencing localhost - so the local staging version might have been pushed to Firebase instead of the built static files! @sfshaza2 try running make build and then deploy to firebase again!

@camsim99
Copy link
Contributor

camsim99 commented Apr 6, 2023

@sfshaza2 Was the go link go/android-android-gradle-error intended to be go/android-java-gradle-error?

[splitting out ApplicationId from PackageName][].
If this occurs, downgrade to the 7.6 release of
Gradle.
* If, as part of this fix, you upgraded to Flutter 3.10
Copy link
Contributor

Choose a reason for hiding this comment

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

This bullet seems completely orthogonal, no? Upgrading to Flutter 3.10 is not connected to upgrading Android Studio.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I'm just a tad worried that folks might upgrade to 3.10 (thinking it might help), and then be really screwed. Especially because there is a new command in 3.10 which tells you if you have this incompatibility situation.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd be more explicit then, I think. Rather than saying "as part of this fix", should we simply say "upgrading to Flutter 3.10 does not fix this problem"?

updates the Java SDK from 11 to 17, which
isn't compatible with the version of the Java SDK
used to build the app's Gradle file when the project
was originally created with `flutter create`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Long run-on sentence?

parlough and others added 3 commits April 6, 2023 13:06
Co-authored-by: Parker Lougheed <parlough@gmail.com>
…de.md

Co-authored-by: Parker Lougheed <parlough@gmail.com>
Copy link
Contributor

@ericwindmill ericwindmill left a comment

Choose a reason for hiding this comment

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

The instructions worked and are easy to follow.

shell script's `JAVA_HOME` environment variable.
* If `JAVA_HOME` isn't defined, Flutter looks
for any `java` executable in your path.
Once [issue 122609][] lands, the `flutter doctor`
Copy link
Contributor

Choose a reason for hiding this comment

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

it is only landing for 3.10 right? or will anyone using flutter doctor in previous releases also get this fix so that they can depend on it?

Copy link
Contributor

Choose a reason for hiding this comment

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

it being issue 122609

Copy link
Contributor Author

Choose a reason for hiding this comment

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

??? I don't know what we advise here.


### Not yet released to stable

* [Android Java Gradle migration guide][]
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm this feels weird to be under not yet release to stable, currently there is nothing in the guide that depends on the next stable release for developers to follow it and unblock themselves when using Flamingo.

if we add the flutter analyze --suggestions tool steps into the guide then it has something that is not yet released to stable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. I can just take it out of the index.

change the `distributionUrl` field to the new Gradle version:

```properties
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should suggest updating to a version that starts with 7 not the latest gradle.
This is for 2 reasons. In my own updates of our owned examples we have had fewer issues, sometimes non when updating to 7.3.3 (minimum) or 7.6.1 (newest 7.* version released in feb) and run into significantly more issues moving to 8.*.
Second is that the gradle tooling as a policy has one major version of depreciation cycle before removal. So assuming their gradle code did have something deprecated it is more likely to exist in major version 7 and removed in 8

Copy link
Contributor

Choose a reason for hiding this comment

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

Per https://gradle.org/whats-new/gradle-8/#upgrades, it looks like users should upgrade to 7.6.1 as an intermediary state, even if they're ultimately moving to 8.x -- so I agree that we should make that our target throughout this doc.

@sfshaza2
Copy link
Contributor Author

sfshaza2 commented Apr 6, 2023

@Updated. Please review again @timsneath @mariamhas @reidbaker

updates its bundled Java SDK from 11 to 17.
Flutter uses the version of Java bundled with
Android Studio to build Android apps.
Gradle versions [prior to 7.3][] can't run
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this supposed to have a link?

Copy link
Contributor

@timsneath timsneath left a comment

Choose a reason for hiding this comment

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

This is looking great. Thank you so much for all your work to make this transition less painful for customers! I'm sure we'll keep tweaking this page over the coming week, but it's a solid LGTM from me!

@sfshaza2 sfshaza2 dismissed mariamhas’s stale review April 7, 2023 17:20

Tim has given permission to do so.

@sfshaza2 sfshaza2 merged commit c690914 into main Apr 7, 2023
@sfshaza2 sfshaza2 deleted the flamingo branch April 7, 2023 17:30
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.

10 participants