* Where:
Build file '/Users/yhartanto/Downloads/dependency-substitution/build.gradle' line: 23
* What went wrong:
A problem occurred evaluating root project 'dependency-substitution'.
> No signature of method: org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DefaultDependencySubstitutions.eachModule() is applicable for argument types: (build_adm3y3p13itj9u5h6fywxclvs$_run_closure1_closure5_closure9) values: [build_adm3y3p13itj9u5h6fywxclvs$_run_closure1_closure5_closure9@2db833ca]
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
--
You received this message because you are subscribed to the Google Groups "gradle-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gradle-dev+...@googlegroups.com.
To post to this group, send email to gradl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gradle-dev/35ebc2f4-a7fa-41c5-8116-b3672ef28acd%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "gradle-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gradle-dev+...@googlegroups.com.
To post to this group, send email to gradl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gradle-dev/35ebc2f4-a7fa-41c5-8116-b3672ef28acd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.name == 'fabric') {
details.useTarget('io.fabric.sdk.android:fabric:1.3.4@aar')
}
}
Thank you for the help. When testing the substitution rule, I found that the notation in useTarget doesn't support ext like in the dependencies declaration, https://github.com/gradle/gradle/blob/master/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ModuleVersionSelector.java.
For example below, the @aar is treated as part of the version as opposed to extension. Can I please request ext to be supported, this will help us Android folks a lot. If it is not in the roadmap, may be a pointer for me to submit a PR.configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.name == 'fabric') {
details.useTarget('io.fabric.sdk.android:fabric:1.3.4@aar')
}
}
To view this discussion on the web visit https://groups.google.com/d/msgid/gradle-dev/ebb33552-176d-4e9f-ad36-87fd4f1afafd%40googlegroups.com.