Thanks to visit codestin.com
Credit goes to github.com

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

[local_auth]: Bump core from 1.8.0 to 1.9.0 in /packages/local_auth/local_auth_android/android #6393

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.1'
classpath 'com.android.tools.build:gradle:7.3.1'
Copy link
Contributor

Choose a reason for hiding this comment

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

What does the error look like without doing this? Presumably plugin clients will have to do this as well, and I'm wondering how good the error message currently is.

Copy link
Contributor

Choose a reason for hiding this comment

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

I need to finish the solution but I pasted the error here: https://docs.google.com/document/d/14ckvV5chTj3c2HDDaw_bdmzUzXa9cHURm0RPXWk5eX8/edit#bookmark=id.5isj41bmhgan

It's not a clear error, unfortunately. Maybe we can try to catch this error and throw a new one, but of course, this wouldn't be the only error that signals a Gradle bump is needed.

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g Oct 25, 2022

Choose a reason for hiding this comment

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

Oof, that's super opaque. How old does someone's AGP version have to be to see that if we bump core here? I'm wondering if we should hold off on landing this until we have a better error message for this at the flutter tool level, or if only very old projects would hit this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like it has to at least be 7.0. It also looks like it is the compileSdkVersion bump that is causing this, which is necessary for the core bump (so I could bump fragment separately). I do want to point out, though, that the error is not fatal, so I guess it's more like a warning. Either way, we could hold off on landing the core bump at least for now, since most projects would probably hit this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, looks like Dependabot wanted to bump fragment again already so I'll land that one: #6645

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
4 changes: 3 additions & 1 deletion packages/local_auth/local_auth_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## NEXT
## 1.0.18

* Updates minimum Flutter version to 3.0.
* Updates androidx.core version to 1.9.0.
* Upgrades compile SDK version to 33.

## 1.0.17

Expand Down
6 changes: 3 additions & 3 deletions packages/local_auth/local_auth_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:7.3.1'
}
}

Expand All @@ -22,7 +22,7 @@ rootProject.allprojects {
apply plugin: 'com.android.library'

android {
compileSdkVersion 31
compileSdkVersion 33

defaultConfig {
minSdkVersion 16
Expand Down Expand Up @@ -51,7 +51,7 @@ android {
}

dependencies {
api "androidx.core:core:1.8.0"
api "androidx.core:core:1.9.0"
api "androidx.biometric:biometric:1.1.0"
api "androidx.fragment:fragment:1.5.5"
testImplementation 'junit:junit:4.13.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31
compileSdkVersion 33

lintOptions {
disable 'InvalidPackage'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.1'
classpath 'com.android.tools.build:gradle:7.3.1'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
2 changes: 1 addition & 1 deletion packages/local_auth/local_auth_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: local_auth_android
description: Android implementation of the local_auth plugin.
repository: https://github.com/flutter/plugins/tree/main/packages/local_auth/local_auth_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22
version: 1.0.17
version: 1.0.18

environment:
sdk: ">=2.14.0 <3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions script/tool/lib/src/create_all_packages_app_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class CreateAllPackagesAppCommand extends PackageCommand {
// minSdkVersion 19 is required by WebView.
newGradle.writeln('minSdkVersion 20');
} else if (line.contains('compileSdkVersion')) {
// compileSdkVersion 32 is required by webview_flutter.
newGradle.writeln('compileSdkVersion 32');
// compileSdkVersion 33 is required by local_auth.
newGradle.writeln('compileSdkVersion 33');
} else {
newGradle.writeln(line);
}
Expand Down