is there a possibility to declare dependencies for a configuration and gradle will download the jar from the Maven repository including source and javadoc jars?
The ‘eclipse’ and ‘idea’ plugins will do so automatically (if instructed). But if you need to grab the sources and javadoc Jars for your own purposes, you’ll ultimately have to make them separate dependencies as you did above.
In terms of shortening the code, you can use the shorthand notation ‘testCompile “junit:junit:4.8.2:javadoc”’. If you want to go further, you can create your own notation. Something like: