I am trying to apply this plugin to my project <ht...
# community-support
j
I am trying to apply this plugin to my project https://github.com/autonomousapps/dependency-analysis-gradle-plugin but I am getting this error while executing the analysis on
:core
module, which depends on
:libs:volley-repack
module...
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':core:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':core:debugCompileClasspath'.
   > Could not resolve project :libs:volley-repack.
     Required by:
         project :core
      > The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.3.2', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm'. However we cannot choose between the following variants of project :libs:volley-repack:
          - projectHealthElements
          - resolvedDepsElements
        All of them match the consumer attributes:
          - Variant 'projectHealthElements' capability android-vente-privee.libs:volley-repack:unspecified:
              - Unmatched attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.3.2')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Provides attribute 'dagp.internal.artifacts' with value 'project-health' but the consumer didn't ask for it
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about its usage (required compile-time)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'resolvedDepsElements' capability android-vente-privee.libs:volley-repack:unspecified:
              - Unmatched attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.3.2')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Provides attribute 'dagp.internal.artifacts' with value 'resolved-deps' but the consumer didn't ask for it
                  - Doesn't say anything about its component category (required a library)
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about its usage (required compile-time)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
the volley build.gradle.kts is just
Copy code
configurations.maybeCreate("default")
artifacts.add("default", file("bettervolley-repack-1.0.1.aar"))
sadly, I can't just remove volley from the project as a solution.... would anyone know how I can fix this task
t
You may actually want to "fix" your libvolley-repack project to actually "correctly" use variants (such that resolution doesn't get broken by the dagp plugin adding additional variants "shadowing" your "default" artifact): https://docs.gradle.org/current/userguide/cross_project_publications.html
j
Let me read the docs... I have no idea of what that configuration is doing..
I don't understand this... should I set those attributes by hand ? Couldn't I just add AGP to the volley module and add the aar as an API dep ?