In Maven projects, there is an option to automatically download sources (and javadoc) for all libraries. For Gradle project I found no option, just to open a class and click "Search in internet". This is very annoying if you have a lot of libraries. Is there any way to automatically attach sources from the internet (maven repo)?
I know that this is an old topic, but in case someone reaches here and does not want to gradle idea, you can also use a plugin and then it will resolve sources automatically.
e.g. both idea and eclipse compatible build.gradle
plugins {
id "java"
id "idea"
id "eclipse"
}
idea {
module {
downloadSources = true
}
}
eclipse {
classpath {
downloadSources = true
}
}
dependencies {
compile group: 'commons-io', name: 'commons-io', version: '2.6'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With