Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve aar project dependencies for task 'lint' on a clean project (race condition?) #152

Closed
bergetp opened this issue Jun 8, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@bergetp
Copy link

bergetp commented Jun 8, 2020

Hi,

Thank you for maintaining this, hopefully this will be solved in the official gradle plugin soon!

We are having an issue with running 'build' on a clean project. The dependency resolution for the lint task isn't able to resolve the dependencies.

How to reproduce

  1. Go to examples
  2. Run
rm -rf build; rm -rf  lib-aar2/build; rm -rf lib-aar/build; rm -rf lib-main/build; ./gradlew clean lib-main:build

Workaround

One workaround I found was to remove the line which adds the 'embed' dependencies to project dependencies and declare the dependencies twice (once with 'embed' and once with 'api'). like this:

embed project(path: ':lib-aar2', configuration:'default')
api project(':lib-aar2')

To me this indicates that there is some sort of race condition? Are the dependencies added too late to the project when using the listener?

Failure message

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':lib-main:lint'.
> Could not resolve all artifacts for configuration ':lib-main:flavor1ReleaseCompileClasspath'.
   > Failed to transform lib-aar.aar (project :lib-aar) to match attributes {artifactType=android-manifest}.
      > Execution failed for IdentityTransform: /Users/pberglund/src/fat-aar-android-spotify/example/lib-aar/build/outputs/aar/lib-aar-release.aar.
         > Expecting a file or a directory: /Users/pberglund/src/fat-aar-android-spotify/example/lib-aar/build/outputs/aar/lib-aar-release.aar
   > Failed to transform lib-aar2.aar (project :lib-aar2) to match attributes {artifactType=android-manifest}.
      > Execution failed for IdentityTransform: /Users/pberglund/src/fat-aar-android-spotify/example/lib-aar2/build/outputs/aar/lib-aar2-release.aar.
         > Expecting a file or a directory: /Users/pberglund/src/fat-aar-android-spotify/example/lib-aar2/build/outputs/aar/lib-aar2-release.aar

Versions

fat-aar version: 1.2.13

@kezong kezong added the bug Something isn't working label Jun 9, 2020
@kezong
Copy link
Owner

kezong commented Jun 9, 2020

Thank you for the feedback.
I fixed it in latest version.
Please try to use fat-aar version 1.2.15.

@bergetp
Copy link
Author

bergetp commented Jun 9, 2020

Thank you, it works! Added a follow up PR.

How did you figure it out btw? Are there any detailed release notes on changes for 4.0.0?

@bergetp bergetp closed this as completed Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants