mogol / flutter_secure_storage

A Flutter plugin to store data in secure storage
https://pub.dartlang.org/packages/flutter_secure_storage
BSD 3-Clause "New" or "Revised" License
1.09k stars 340 forks source link

Flutter+Android flavoring compatibility seems to be broken #652

Open kkaun opened 7 months ago

kkaun commented 7 months ago

Starting from version 8.0.0, my team is experiencing an error when trying to build for Android with productFlavors.

We've updated to 7.0.1, and we haven't experienced any similar problems prior to this version inclusively.

So, while having

productFlavors {
        dev {
            dimension "projectname"
            applicationIdSuffix ".dev"
            resValue "string", "app_name", "Projectname(Dev)"
        }
        prod {
            // similar setup for prod
        }
}

, we're experiencing the next error for Android builds, regardless of build mode:

FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDevDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:devDebugCompileClasspath'.
   > Could not resolve project :flutter_secure_storage.
     Required by:
         project :app
      > No matching configuration of project :flutter_secure_storage was found. 
The consumer was configured to find an API of a component, 
as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', 
attribute 'projectname' with value 'dev', 
attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - None of the consumable configurations have attributes.

I'm curious, what changes starting from version 8.0.0 could cause the issue. Any feedback will be appreciated.