[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Update Gradle and AGP in examples to 7.0 #6625

Merged
merged 8 commits into from
Oct 26, 2022

Conversation

stuartmorgan
Copy link
Contributor
@stuartmorgan stuartmorgan commented Oct 26, 2022

Since #6614 was painless, I wanted to try bringing all of the examples up to 7.0 (both Gradle and AGP) to see if that goes smoothly as well. This gets us to about a year behind current releases (rather than 3+).

This does only examples since we're still investigating issues like flutter/flutter#111304

Also:

  • Updates all espresso references to the current version (0.2.0), since 0.1.0 uses a compileSdkVersion that is too old.
  • Updates the tooling to know that example build files are version- and changelog-exempt, so that this doesn't have false-positive version check failures.

Fixes flutter/flutter#112410
Fixes flutter/flutter#111560

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

@GaryQian
Copy link
Contributor

Tests seem red due though. Looks min SDK related.

@stuartmorgan
Copy link
Contributor Author

I have some fixed; at least one is turning into a rat hole and I may revert it.

@stuartmorgan
Copy link
Contributor Author

Before I give up on these two packages for now: @GaryQian or @camsim99 do you have any idea what's going on here?

The error is:

> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
   > One or more issues found when checking AAR metadata values:
     The minCompileSdk (31) specified in a
     dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
     is greater than this module's compileSdkVersion (android-29).
     Dependency: androidx.window:window-java:1.0.0-beta04.
     AAR metadata file: /root/.gradle/caches/transforms-3/41a83d0cf61e3d2ab42ea706b65148ab/transformed/jetified-window-java-1.0.0-beta04/META-INF/com/android/build/gradle/aar-metadata.properties.
     The minCompileSdk (31) specified in a
     dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
     is greater than this module's compileSdkVersion (android-29).
     Dependency: androidx.window:window:1.0.0-beta04.
     AAR metadata file: /root/.gradle/caches/transforms-3/bb9a53f8c4dc071c681fa071739dc70b/transformed/jetified-window-1.0.0-beta04/META-INF/com/android/build/gradle/aar-metadata.properties.

But I don't see us using 29 in google_maps_flutter_android or google_sign_in_android, only 31.

@camsim99
Copy link
Contributor

@stuartmorgan Since the error is coming from espresso, it's possible that it's complaining because espresso's targetSdkVersion of 29 is conflicting with that dependency's compileSdkVersion. Maybe you could try bumping it to 31?

@stuartmorgan
Copy link
Contributor Author

@stuartmorgan Since the error is coming from espresso, it's possible that it's complaining because espresso's targetSdkVersion of 29 is conflicting with that dependency's compileSdkVersion. Maybe you could try bumping it to 31?

Ah-ha! This wasn't exactly it (targetSdkVersion is only a property of the example app not the espresso library), but while I was looking at that again I found what I had missed before. While the in-tree espresso package has compileSdkVersion of 31, which made me think it was unrelated, we've done a major version bump of espresso as part of updating some of its dependencies. But we hadn't picked that up everywhere (probably we couldn't because of the gradle versions of our examples being so old), so I was pulling a version of the package that still had its compile version set to 29. Just bumping to 0.2.0 in the pubspec fixed it. Thanks!

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 26, 2022
@auto-submit auto-submit bot merged commit 91122ec into flutter:main Oct 26, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 27, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 27, 2022
adam-harwood pushed a commit to adam-harwood/flutter_plugins that referenced this pull request Nov 3, 2022
@stuartmorgan stuartmorgan deleted the example-gradle-7-update branch January 21, 2023 13:14
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants