I am trying to declare the dependencies
in my gradle project using the technique described in this answer.
However when I do so I get this error:
No such property: libraries for class
How can I fix this?
Dependencies declared as properties at top level build.gradle as follows:
ext.libraries = [
junit: 'junit:junit:4.10'
]
Trying to retrieve dependency in module level build.gradle (where error is being thrown):
testCompile([
libraries.junit
])
Error thrown:
No such property: libraries for class: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler