I guess your question is related to a dev workspace, here are links explaining how to add the required configuration in Gradle using the IDEs' plugins:
For Eclipse:
apply plugin: 'java'
apply plugin: 'eclipse'
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}
For IntelliJ & Android Studio
apply plugin: 'java'
apply plugin: 'idea'
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
To run these plugins:
gradle cleanEclipse eclipse
gradle cleanIdea idea
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…