Including Dependencies in Your Gradle Build Script's Classpath
In a recent project, I wanted to use SnakeYAML in my Gradle build script. This is pretty easy to do; all you have to do is add the following to your script:
1 | buildscript { |
This is the same as the repositories {}
and dependencies {}
sections of the build script. After doing this, feel free to use your libraries anywhere in your build script. Don’t forget to import the classes you use!
Thanks for reading my post! If you enjoyed it or it helped you, please consider liking/tweeting this page, commenting, or following me on GitHub or Twitter!