LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: [CLOSED] Not correct snippet for Gradle in Download section  (Read 272 times)

Hamsteri

  • Newbie
  • *
  • Offline Offline
  • Posts: 1

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

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1746
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!
Logged