Hello Guest

[CLOSED] Not correct snippet for Gradle in Download section

  • 1 Replies
  • 1150 Views
Not work snippet for Gradle: https://www.lwjgl.org/download
Need replace Maven repository "https://oss.sonatype.org/content/repositories/snapshots/" on "https://oss.sonatype.org/content/repositories/releases/" and set variable "project.ext.lwjglVersion = "3.1.0"" (delete word SNAPSHOT).

Full correct snippet:
Code: [Select]
import org.gradle.internal.os.OperatingSystem

switch ( OperatingSystem.current() ) {
    case OperatingSystem.WINDOWS:
        project.ext.lwjglNatives = "natives-windows"
        break
    case OperatingSystem.LINUX:
        project.ext.lwjglNatives = "natives-linux"
        break
    case OperatingSystem.MAC_OS:
        project.ext.lwjglNatives = "natives-macos"
        break
}

project.ext.lwjglVersion = "3.1.0"

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}

dependencies {
    // LWJGL dependencies START
    compile "org.lwjgl:lwjgl:${lwjglVersion}"
    compile "org.lwjgl:lwjgl-glfw:${lwjglVersion}"
    // ... other ...
    compile "org.lwjgl:lwjgl-vulkan:${lwjglVersion}"
    // LWJGL natives
    runtime "org.lwjgl:lwjgl:${lwjglVersion}:${lwjglNatives}"
    runtime "org.lwjgl:lwjgl-glfw:${lwjglVersion}:${lwjglNatives}"
    // ... other ...
    runtime "org.lwjgl:lwjgl-tinyfd:${lwjglVersion}:${lwjglNatives}"
    // LWJGL dependencies END
}
« Last Edit: October 31, 2016, 19:27:56 by Hamsteri »

*

Offline spasi

  • *****
  • 1988
    • WebHotelier
Re: Not correct snippet for Gradle in Download section
« Reply #1 on: October 31, 2016, 12:23:04 »
The snippet contents depend on the build type you have selected. The release build has no SNAPSHOT suffix.

A repository declaration was indeed missing in the release build snippet. It has been added now (just mavenCentral() instead of the explicit URL). Thanks!