I don't like that I repeat every repository dependency (let us say, junit
), for the main project and for subprojects. Is there a possibility to make the subproject to use the dependencies of the main project. Or is there another way to escape that repetition?
root/build.gradle
allprojects {
if (plugins.hasPlugin('java')) {
dependencies {
testCompile 'junit:junit:4.12'
}
}
}