authpass / biometric_storage

Flutter plugin to store data behind biometric authentication (ie. fingerprint)
https://pub.dev/packages/biometric_storage
MIT License
171 stars 101 forks source link

Minimum supported Gradle version is 6.5 #33

Closed aelahmar closed 2 years ago

aelahmar commented 2 years ago

Hi there,

Thanks for your library! Lately I upgraded my project flutter and Android, and when building for release I'm getting this error:

`Build file '/.pub-cache/hosted/pub.dartlang.org/biometric_storage-3.0.0-rc.2/android/build.gradle' line: 24

What went wrong: A problem occurred evaluating root project 'biometric_storage'.

Failed to apply plugin [id 'com.android.internal.version-check'] Minimum supported Gradle version is 6.5. Current version is 5.4.1. If using the gradle wrapper, try editing the distributionUrl in /.pub-cache/hosted/pub.dartlang.org/biometric_storage-3.0.0-rc.2/android/gradle/wrapper/gradle-wrapper.properties to gradle-6.5-all.zip`

hpoul commented 2 years ago

That's a bit weird, that it is complaining about the gradle wrapper version.. in think it's a bug that I've included that gradle directory in the pub package 🤨 I'll take a look later

hpoul commented 2 years ago

No, there must be something else going on.. I'm also using 6.5 without any problems.. 🤔️ and it seems correct that this is all published to pub. No idea where that's coming from.

hpoul commented 2 years ago

I don't think this is related to this plugin, see https://github.com/flutter/flutter/issues/61082#issuecomment-747741768 You can try to temporarily remove biometric_storage dependency, if this fixes your build, let me know and i'll investigate further.

aelahmar commented 2 years ago

Yes, when I remove it the build is fixed

aelahmar commented 2 years ago

My gradle config:

buildscript { ext.kotlin_version = '1.4.31' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.5' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0' } }

defaultConfig { applicationId "*****" minSdkVersion 23 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } My gradle-wrapper.properties: distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists

aelahmar commented 2 years ago

Below your gradle-wrapper.properties after pub-get: gradle-wrapper.properties

hpoul commented 2 years ago

i still doubt that there is any problem with the plugin.. the gradle wrapper should never be looked at.. anyway.. i've just deleted it, and updated everything.. feel free to try rc.3 .. fwiw.. you might want to run flutter clean .. but i'm using basically the same setup, and everything works fine.. also the example compiles without problems. So it must be some incompatibility maybe with another plugin.. or something strange.. but I don't think this is the root cause.

aelahmar commented 2 years ago

Yes it's fixed with rc.3 !! Thanks