gradle 怎么配置依赖对所有的子模块都生效?
資深大佬 : rizon 4
研究了好半天也不会。 我在根模块添加:
subprojects{ dependencies{ testCompile group: 'junit', name: 'junit', version: '4.12' } }
这个 gradle 执行会报错
A problem occurred evaluating root project 'operation'. > Could not find method testCompile() for arguments [{group=junit, name=junit, version=4.12}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
大佬有話說 (5)