Abhimanyu
05/16/2024, 5:49 PMAbhimanyu
05/16/2024, 5:49 PMFAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:detekt'.
> Could not resolve all task dependencies for configuration ':app:detektPlugins'.
> Could not resolve project :rules.
Required by:
project :app
> Cannot choose between the following variants of project :rules:
- debugRuntimeElements
- releaseRuntimeElements
All of them match the consumer attributes:
- Variant 'debugRuntimeElements' capability Finance Manager:rules:unspecified:
- Unmatched attributes:
- Provides com.android.build.api.attributes.AgpVersionAttr '8.4.0' but the consumer didn't ask for it
- Provides com.android.build.api.attributes.BuildTypeAttr 'debug' but the consumer didn't ask for it
- Provides com.android.build.gradle.internal.attributes.VariantAttr 'debug' but the consumer didn't ask for it
- Provides org.gradle.category 'library' but the consumer didn't ask for it
- Provides org.gradle.jvm.environment 'android' but the consumer didn't ask for it
- Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.platform.type 'androidJvm' but the consumer didn't ask for it
- Variant 'releaseRuntimeElements' capability Finance Manager:rules:unspecified:
- Unmatched attributes:
- Provides com.android.build.api.attributes.AgpVersionAttr '8.4.0' but the consumer didn't ask for it
- Provides com.android.build.api.attributes.BuildTypeAttr 'release' but the consumer didn't ask for it
- Provides com.android.build.gradle.internal.attributes.VariantAttr 'release' but the consumer didn't ask for it
- Provides org.gradle.category 'library' but the consumer didn't ask for it
- Provides org.gradle.jvm.environment 'android' but the consumer didn't ask for it
- Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
- Provides org.jetbrains.kotlin.platform.type 'androidJvm' but the consumer didn't ask for it
* Try:
> Ambiguity errors are explained in more detail at <https://docs.gradle.org/8.7/userguide/variant_model.html#sub:variant-ambiguity>.
> Review the variant matching algorithm at <https://docs.gradle.org/8.7/userguide/variant_attributes.html#sec:abm_algorithm>.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.
Nicholas Doglio
05/16/2024, 5:55 PMAbhimanyu
05/16/2024, 6:02 PMAbhimanyu
05/16/2024, 6:02 PMhandstandsam
05/16/2024, 6:08 PMAbhimanyu
05/16/2024, 6:32 PMhandstandsam
05/16/2024, 6:40 PMresources/META-INF/...
config.
Once you have a module like that, then you can use detektPlugins(project(":my-detekt-rules"))
and they'll show up.
In the detekt plugin config, you can set debug = true
and it helps debugging.Abhimanyu
05/16/2024, 6:42 PMhandstandsam
05/16/2024, 6:48 PM