auth0-flutter icon indicating copy to clipboard operation
auth0-flutter copied to clipboard

':auth0_flutter:testDebugUnitTest'. Failing on Android gradle clean build

Open arc4randall opened this issue 1 year ago • 1 comments

Checklist

  • [X] The issue can be reproduced in the auth0_flutter sample app (or N/A).
  • [X] I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
  • [X] I have looked into the API documentation and have not found a suitable solution or answer.
  • [X] I have searched the issues and have not found a suitable solution or answer.
  • [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • [X] I agree to the terms within the Auth0 Code of Conduct.

Description

  • What went wrong: Execution failed for task ':auth0_flutter:testDebugUnitTest'.

There were failing tests. See the report at: file:///home/runner/work/MyApp/MyApp/build/auth0_flutter/reports/tests/testDebugUnitTest/index.html

Reproduction

  1. Create a Flutter Project

  2. Install auth0_flutter: ^1.5.0

  3. Add manifestPlaceholders += [auth0Domain: auth0Domain, auth0Scheme: auth0Scheme, appAuthRedirectScheme: appAuthRedirectScheme] in android/app/build.gradle

  4. Add `

             <category android:name="android.intent.category.DEFAULT" />
             <category android:name="android.intent.category.BROWSABLE" />
    
             <!-- This line uses the placeholder defined in your build.gradle -->
             <data android:scheme="${appAuthRedirectScheme}" />
         </intent-filter>` to AndroidManifest.xml
    
  5. Run gradlew clean build

Additional context

"com.android.tools.build:gradle:8.3.0" minSdkVersion 22 targetSdkVersion 34

auth0_flutter version

1.5.0

Flutter version

3.19.2

Platform

Android

Platform version(s)

No response

arc4randall avatar Mar 06 '24 15:03 arc4randall

I believe this is caused because shared_preferences_android is a transitive dependency and this is failing on shared_preferences_android:lintDebug. The only way I am able to get my gradlew clean build to pass is to use these flags: ./gradlew clean build -x lint -x test

arc4randall avatar Mar 06 '24 18:03 arc4randall