I need to force the configuration in the gradle in my android application and my gradle verision is 3.0.1. the below is the old way of doing it and i need the equivalent of Gradle 3.0.
releaseCompile project(path: ':androidLibrary', configuration: 'debug')
My error version :
releaseImplementation project(path: ':androidLibrary', configuration: 'debug')
the above gives me an error message as
Error:Unable to resolve dependency for ':main@release/compileClasspath': Could not resolve project :androidLibrary."
Error:Unable to resolve dependency for ':main@releaseUnitTest/compileClasspath': Could not resolve project :androidLibrary.
Have you tried the following instead?
According to Google's Migrate to Android Plugin for Gradle 3.0.0, "targeting a specific variant of a local module dependency (for example, using configuration: 'debug') causes the following build error:"
I think you're targeting a specific variant of a local module dependency when you use the
release
prefix inreleaseImplementation
and when you includeconfiguration: 'debug'
in this statement:It goes on to recommend the following solution:
"You should instead configure your dependencies as follows":
source: Migrate dependency configurations for local modules