Closed vbuberen closed 2 years ago
Build Android
job fails due to Github Actions using Flutter 2.0.0, which couldn't work with Gradle 7 and newer.
Here is the issue in the Flutter repo with fix, which adds the compatibility: https://github.com/flutter/flutter/pull/79167
Thus, will update version of Flutter used on CI in this PR as well to make all actions pass.
@vbuberen what are the consequences of updating the library to flutter 3.0?
In the context of this PR nothing changes for the project because of building with Dart 2.17 and Flutter 3 as I introduced no new code or features, which appeared only in mentioned releases.
In case you would like to check yourself here are links with release notes descriptions: https://docs.flutter.dev/development/tools/sdk/release-notes/release-notes-3.0.0 https://medium.com/dartlang/dart-2-17-b216bfc80c5d
@danielgomezrico Do you you want me to address something else in this PR or it can be merged? Would like to open one more PR with some Segment Android SDK updates, but feel like we might want to merge this one first.
Thanks for approval. I was curios more on when this PR will be merged đŸ˜„
@vbuberen LGTM thanks for opening the PR!
While going through the source code in the repo I saw that plugin and example app both have quiet outdated Android build configuration and decided to help bring it up to date a little bit.
7.2.0
in both plugin and example, which is latest at the moment. Needed to be able to build project in latest Android Studio versions as3.2
is already minimal supported version: https://developer.android.com/studio/releases/gradle-plugin7.4.2
in both plugin and example as after changing version Android Gradle version we had to update wrapper anyway.compileSDK
to 31 for plugin andtargetSDK
for example to compile against currently latest Android SDK.exported=true
in AndroidManifest of example as it is a requirement in SDK 31.android:name="${applicationName}"
to not have build issues saying thatexample
uses Flutter embedding V1.android.useAndroidX=true
flag as project has dependencies which use AndroidX, but doesn't enable AndroidX usage itself, so you can see following warnings during build:P.S.
pubspec.lock
versions changed because I was building the project after my changes and had to dopub.get
. Version bump for Dart happened because I use latest stable versions of Dart and Flutter. These updates would need to happen anyway, so didn't revert them.