openmobilehub / android-omh-auth

Apache License 2.0
4 stars 1 forks source link

Task Execution Failure for `:app:mergeDebugJavaResource` with `android-omh-auth` #98

Closed dzuluaga closed 1 month ago

dzuluaga commented 3 months ago

When using the android-omh-auth library, the following error is generated during the build process:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeDebugJavaResource'.
...
Caused by: com.android.builder.merge.DuplicateRelativeFileException: 2 files found with path 'META-INF/DEPENDENCIES'.
Adding a packaging block may help, please refer to
https://developer.android.com/reference/tools/gradle-api/8.5/com/android/build/api/dsl/Packaging
for more information

Workaround

We have identified a workaround that resolves the issue by modifying the build.gradle.kts file at the app level:

packaging {
    resources.excludes.add("META-INF/DEPENDENCIES")
}

While this workaround is effective, ideally, users should not have to manually add this configuration to their projects.

Request

Please investigate a potential fix for this issue so that users do not need to manually add the packaging block. In the meantime, it would be helpful to document this workaround in the android-omh-auth documentation, similar to how it has been documented for react-native-omh-auth here.

adamTrz commented 2 months ago

Hi @dzuluaga I've extended docs with how users can fix this error - #106

Unfortunately it looks like this is an official fix that is mentioned in multiple places like here and here (Auth0 GH)

dzuluaga commented 1 month ago

Thanks, @adamTrz. Please merge the changes to close this issue.