JOGL with Gradle

Here is a simple build.gradle file for a JOGL project.

apply plugin: "java"
apply plugin: "application"

mainClassName = "ben.Main"

repositories {
    jcenter()
}

dependencies {
    compile "org.jogamp.gluegen:gluegen-rt:2.3.1"
    compile "org.jogamp.jogl:jogl-all:2.3.1"

    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-android-aarch64"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-android-armv6"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-linux-amd64"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-linux-armv6"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-linux-armv6hf"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-linux-i586"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-macosx-universal"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-solaris-amd64"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-solaris-i586"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-windows-amd64"
    runtime "org.jogamp.gluegen:gluegen-rt:2.3.1:natives-windows-i586"

    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-android-aarch64"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-android-armv6"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-linux-amd64"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-linux-armv6"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-linux-armv6hf"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-linux-i586"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-macosx-universal"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-solaris-amd64"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-solaris-i586"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-windows-amd64"
    runtime "org.jogamp.jogl:jogl-all:2.3.1:natives-windows-i586"
}

Without the runtime dependencies it will throw unsatisfied link errors.

Advertisements