Skip to content
Advertisement

Configuring Gradle project to depend on lwjgl

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.)

Advertisement

Answer

I think what you want is to have lwjgl in your build classpath and resolve it automatically right?

try this snippet:

plugins {
    id "java"
}

repositories{
    maven {
        url = "http://adterrasperaspera.com/lwjgl" 
    }
}

dependencies{
    implementation "org.lwjgl:lwjgl:2.6"
    implementation "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é

Advertisement