LWJGLX / lwjgl3-awt

AWT support for LWJGL3
MIT License
115 stars 26 forks source link

Could not find lwjgl-3.2.3-natives-${platform}.jar (org.lwjgl:lwjgl:3.2.3) #25

Closed DeflatedPickle closed 3 years ago

DeflatedPickle commented 3 years ago

Whenever I try to use this library, in any project, I get this issue. It only occurs when I add this library. I'm sure I'm doing something wrong, I don't fully understand Gradle and I can't find any examples for this using it

gradle.properties

lwjglVersion=3.2.3
lwjglAwtVersion=0.1.7

build.gradle

repositories {
    jcenter()
    mavenCentral()

    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation "org.lwjgl:lwjgl:${lwjglVersion}"

    runtimeOnly "org.lwjgl:lwjgl:${lwjglVersion}:natives-windows-x86"
    runtimeOnly "org.lwjgl:lwjgl:${lwjglVersion}:natives-linux"
    runtimeOnly "org.lwjgl:lwjgl:${lwjglVersion}:natives-macos"

    implementation "org.lwjglx:lwjgl3-awt:${lwjglAwtVersion}"
}

Log:

Could not find lwjgl-3.2.3-natives-${platform}.jar (org.lwjgl:lwjgl:3.2.3).
Searched in the following locations:
    https://jcenter.bintray.com/org/lwjgl/lwjgl/3.2.3/lwjgl-3.2.3-natives-${platform}.jar

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
tisoft commented 3 years ago

I have added a fix for this in #26. Until then you can exclude the dependencies:

 dependencies {
     implementation "org.lwjgl:lwjgl:${lwjglVersion}"

     runtimeOnly "org.lwjgl:lwjgl:${lwjglVersion}:natives-windows-x86"
     runtimeOnly "org.lwjgl:lwjgl:${lwjglVersion}:natives-linux"
     runtimeOnly "org.lwjgl:lwjgl:${lwjglVersion}:natives-macos"

     implementation ("org.lwjglx:lwjgl3-awt:${lwjglAwtVersion}") {
        exclude group: '*', module: '*'
    }
    implementation "org.lwjgl:lwjgl-jawt:${lwjglVersion}"
 }