开发者

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 c开发者_开发知识库onfiguring things would be appreciated.

(I don't know any Ivy or Maven.)


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é

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜