cjstehno / gradle-natives

Gradle plugin to aid in managing native libraries associated with Java-based projects.
http://cjstehno.github.io/gradle-natives/
Apache License 2.0
32 stars 4 forks source link

gradle-natives and LWJGL 3.0.0a #13

Closed tillarnold closed 8 years ago

tillarnold commented 9 years ago

I'm trying to build a LWJGL 3.0.0a project with gradle. I followed the instructions at https://github.com/cjstehno/coffeaelectronica/wiki/Going-Native-with-Gradle and tried to use the newer LWJGL version. When I run gradle unpackNatives no files are added in the build/natives/PLATFORM folder. I'm using this build.gradle:

apply plugin: 'java'
apply plugin: 'application'
project.ext.lwjglVersion = "3.0.0a"

run {
    systemProperty 'java.library.path', file( 'build/natives/windows' )
}

mainClassName = 'game.Main'

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.com.stehno:gradle-natives:0.2.3"
  }
}

apply plugin: "com.stehno.natives"

repositories {
    mavenCentral()
}

natives {
    jars = [
        'lwjgl-platform-${lwjglVersion}-natives-windows.jar', 
        'lwjgl-platform-${lwjglVersion}-natives-osx.jar', 
        'lwjgl-platform-${lwjglVersion}-natives-linux.jar'
    ]
}

dependencies {
    compile "org.lwjgl:lwjgl:${lwjglVersion}"
    compile "org.lwjgl:lwjgl-platform:${lwjglVersion}:natives-windows"
    compile "org.lwjgl:lwjgl-platform:${lwjglVersion}:natives-linux"
    compile "org.lwjgl:lwjgl-platform:${lwjglVersion}:natives-osx"
}

I don't know if this is a problem with gradle-natives or if I did something wrong with this configuration.

cjstehno commented 9 years ago

I will take a look at it. My suspicion is that they moved or renamed the native components somehow.

cjstehno commented 9 years ago

Version 3.0.0a of lwjgl is labeled as an "alpha" release. I'd rather wait to make any changes until at least a beta or release candidate version comes out. Please feel free to remind me of this issue at that time if it still exists. Unless there is some reason you need the bleeding edge version of lwjgl, I would suggest you downgrade to something in the 2.9.x line, which should work with the plugin.

tillarnold commented 9 years ago

Thanks for your help.

I would suggest you downgrade to something in the 2.9.x line

That sound like a good idea. I'll do that.

cjstehno commented 8 years ago

I am closing this issue in favor of #15 which I should be able to address within the next week or so.