Skip to content
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

Run AGP update on all integration_tests in flutter/dev #123636

Open
reidbaker opened this issue Mar 28, 2023 · 4 comments
Open

Run AGP update on all integration_tests in flutter/dev #123636

reidbaker opened this issue Mar 28, 2023 · 4 comments
Labels
P2 Important issues not at the top of the work list platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team

Comments

@reidbaker
Copy link
Contributor

See discussion in flutter/packages#3408 and #122137 and #122213 13 We should make all of the examples compatible with the upcoming version of Android Studio.

This ticket covers integration_tests in https://github.com/flutter/flutter/tree/master/dev.

@reidbaker reidbaker added platform-android Android applications specifically P2 Important issues not at the top of the work list labels Mar 28, 2023
@bartekpacia
Copy link
Member

bartekpacia commented Mar 28, 2023

So I suggest upgrading all the integration tests to these newest versions (unless we want to have some integration tests run on older versions of AGP and Gradle to make sure we're compatible with them. Some basic support policy would be helpful here to define what's the version range to support).

@bartekpacia
Copy link
Member

bartekpacia commented Mar 28, 2023

Tangentially, I think it's worth writing a migration in flutter_tools to upgrade AGP and Gradle. Not all developers use Android Studio directly often enough to stay up to date with them (I guess it's the minority).

That's a separate issue though.

@reidbaker
Copy link
Contributor Author

Migration work is tracked by #122376 (good idea)

auto-submit bot pushed a commit that referenced this issue Apr 27, 2023
…dio bundled Java version is detected (#124085)

This PR adds an android project migrator that checks the version of android studio and the version of gradle for conflicts, and upgrades to 7.4 if a conflict is detected. For more detail about the particular conflict, see #122376.

The PR also upgrades older gradle versions being used in integration testing to 7.4. 

Fixes/related to: #122376 and #123636
auto-submit bot pushed a commit that referenced this issue May 3, 2023
…droid Studio bundled Java version is detected (#125836)

This is an attempt to reland #124085.

Differences from this attempt and the last: 
1. Adds a check for null android studio versions and a test for this case.
2. Wraps the migrate code in a try-catch [per the suggestion here](https://github.com/flutter/flutter/pull/125728/files#r1181747899).

Old PR description:
This PR adds an android project migrator that checks the version of android studio and the version of gradle for conflicts, and upgrades to 7.4 if a conflict is detected. For more detail about the particular conflict, see #122376.

The PR also upgrades older gradle versions being used in integration testing to 7.4.

Fixes/related to: #122376 and #123636
gmackall added a commit to gmackall/flutter that referenced this issue May 4, 2023
…droid Studio bundled Java version is detected (flutter#125836)

This is an attempt to reland flutter#124085.

Differences from this attempt and the last:
1. Adds a check for null android studio versions and a test for this case.
2. Wraps the migrate code in a try-catch [per the suggestion here](https://github.com/flutter/flutter/pull/125728/files#r1181747899).

Old PR description:
This PR adds an android project migrator that checks the version of android studio and the version of gradle for conflicts, and upgrades to 7.4 if a conflict is detected. For more detail about the particular conflict, see flutter#122376.

The PR also upgrades older gradle versions being used in integration testing to 7.4.

Fixes/related to: flutter#122376 and flutter#123636
gmackall added a commit to gmackall/flutter that referenced this issue May 5, 2023
…droid Studio bundled Java version is detected (flutter#125836)

This is an attempt to reland flutter#124085.

Differences from this attempt and the last:
1. Adds a check for null android studio versions and a test for this case.
2. Wraps the migrate code in a try-catch [per the suggestion here](https://github.com/flutter/flutter/pull/125728/files#r1181747899).

Old PR description:
This PR adds an android project migrator that checks the version of android studio and the version of gradle for conflicts, and upgrades to 7.4 if a conflict is detected. For more detail about the particular conflict, see flutter#122376.

The PR also upgrades older gradle versions being used in integration testing to 7.4.

Fixes/related to: flutter#122376 and flutter#123636
@reidbaker
Copy link
Contributor Author

So I suggest upgrading all the integration tests to these newest versions (unless we want to have some integration tests run on older versions of AGP and Gradle to make sure we're compatible with them. Some basic support policy would be helpful here to define what's the version range to support).

Unfortunately I do not think flutter/flutter does not get the tools support we have in flutter/packages.

fluttermirroringbot pushed a commit that referenced this issue Jun 30, 2023
Upgrades tests under `dev/integration_tests` to use the latest values [in the templates](https://github.com/flutter/flutter/blob/944d6c8fef76b2db7a2c33eeb1653de2b8571fd8/dev/tools/bin/generate_gradle_lockfiles.dart#L135). Most of this PR was auto-generated, by running `find dev/integration_tests/ -type d -name 'android' | dart dev/tools/bin/generate_gradle_lockfiles.dart` from the root of the flutter directory.

The pieces that were not are:
1. Upgrading the Gradle versions used in integration tests to be >=7.4, in places where it was currently lower.
2. Upgrading the mac, windows, and linux build_tests .ci.yaml configuration to use jdk 17 on all shards. It currently was using a mix of 17 and 11. This isn't desirable, because some of the tests require 17, and the distribution is [random across shards](https://github.com/flutter/flutter/blob/cef9a8c54b766fa5f66e6fbdf7df341176f8e29f/dev/bots/test.dart#L553) (so they were only passing because they were getting randomly placed on shards using jdk 17).
3. Adding a dependency on jdk 11 for the tests based on the `firebaselab/firebaselab` recipe. Previously they had no java dependency, and were therefore defaulting to java 1.8. The newer AGP versions necessitated an upgrade to 11 to run.

Note that it also ended up downgrading the AGP version in two places (in the [hybrid_android_views](https://github.com/flutter/flutter/pull/129642/files#diff-d7cfaa1c96d5c2383e7fc253ac8c9df062b544c24f7d80aa8a02290c01d17205L17) and [platform_interaction](https://github.com/flutter/flutter/pull/129642/files#diff-b2fba811efadd1cfb097bebd93be99fe4b6d6f17aefa863267290fc704290766L17) tests), because those had been manually edited to a newer version than the template.

Related to: #123636, #123910
@flutter-triage-bot flutter-triage-bot bot added team-android Owned by Android platform team triaged-android Triaged by Android platform team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Important issues not at the top of the work list platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team
Projects
None yet
2 participants