[CLOSED] Not correct snippet for Gradle in Download section

Started by Hamsteri, October 31, 2016, 09:16:12

Previous topic - Next topic

Hamsteri

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:
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
}

spasi

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!