Configuring Gradle project to depend on lwjgl
Question
How do I configure build.gradle
to depend on LWJGL?
I'm new to Gradle, and how to configure library dependencies is clear as mud to me.
It's my understanding is that one can specify library dependencies for Gradle to download rather than checking them in to source control, but any sort of help with configuring things would be appreciated.
(I don't know any Ivy or Maven.)
Solution
I think what you want is to have lwjgl in your build classpath and resolve it automatically right?
try this snippet:
apply plugin:'java'
repositories{
mavenRepo(urls: "http://adterrasperaspera.com/lwjgl")
}
dependencies{
compile "org.lwjgl:lwjgl:2.6"
compile "org.lwjgl:lwjgl-util:2.6"
}
This snippet above defines a maven repository which contains the lwjgl libs and defines two compile dependencies to your project.
regards, René
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow