Skip to content

Commit

Permalink
Correct warnings about usage of private gradle type
Browse files Browse the repository at this point in the history
  • Loading branch information
Renanse committed May 27, 2024
1 parent 978b80f commit 1e6c73b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions ardor3d-lwjgl3-swt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import org.gradle.internal.os.OperatingSystem
description = "Ardor 3D LWJGL3 SWT"

val lwjglSwtVersion = "1.0.0"
val lwjgl3SwtPackage = when (OperatingSystem.current()) {
OperatingSystem.WINDOWS -> "lwjgl3-swt-windows"
OperatingSystem.LINUX -> "lwjgl3-swt-linux"
OperatingSystem.MAC_OS -> "lwjgl3-swt-macos"
val lwjgl3SwtPackage = when {
OperatingSystem.current().isWindows -> "lwjgl3-swt-windows"
OperatingSystem.current().isLinux -> "lwjgl3-swt-linux"
OperatingSystem.current().isMacOsX -> "lwjgl3-swt-macos"
else -> throw IllegalStateException("Unsupported operating system")
}

Expand Down
8 changes: 4 additions & 4 deletions ardor3d-swt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import org.gradle.internal.os.OperatingSystem
description = "Ardor 3D SWT"

val swtVersion = "3.115.0"
val swtNatives = when (OperatingSystem.current()) {
OperatingSystem.WINDOWS -> "org.eclipse.swt.win32.win32.x86_64"
OperatingSystem.LINUX -> "org.eclipse.swt.gtk.linux.x86_64"
OperatingSystem.MAC_OS -> "org.eclipse.swt.cocoa.macosx.x86_64"
val swtNatives = when {
OperatingSystem.current().isWindows -> "org.eclipse.swt.win32.win32.x86_64"
OperatingSystem.current().isLinux -> "org.eclipse.swt.gtk.linux.x86_64"
OperatingSystem.current().isMacOsX -> "org.eclipse.swt.cocoa.macosx.x86_64"
else -> throw IllegalStateException("Unsupported operating system")
}

Expand Down
16 changes: 8 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ group = "com.ardor3d"
version = "1.6.2"

extra["lwjglVersion"] = "3.3.3"
extra["lwjglNatives"] = when (OperatingSystem.current()) {
OperatingSystem.WINDOWS -> "natives-windows"
OperatingSystem.LINUX -> "natives-linux"
OperatingSystem.MAC_OS -> "natives-macos"
extra["lwjglNatives"] = when {
OperatingSystem.current().isWindows -> "natives-windows"
OperatingSystem.current().isLinux -> "natives-linux"
OperatingSystem.current().isMacOsX -> "natives-macos"
else -> throw IllegalStateException("Unsupported operating system")
}

Expand Down Expand Up @@ -43,14 +43,14 @@ allprojects {
resolutionStrategy {
eachDependency {
if (requested.name.contains("\${osgi.platform}")) {
when (OperatingSystem.current()) {
OperatingSystem.WINDOWS -> {
when {
OperatingSystem.current().isWindows -> {
useTarget(requested.toString().replace("\${osgi.platform}", "win32.win32.x86_64:3.108.0"))
}
OperatingSystem.LINUX -> {
OperatingSystem.current().isLinux -> {
useTarget(requested.toString().replace("\${osgi.platform}", "gtk.linux.x86_64:3.108.0"))
}
OperatingSystem.MAC_OS -> {
OperatingSystem.current().isMacOsX -> {
useTarget(requested.toString().replace("\${osgi.platform}", "cocoa.macosx.x86_64:3.108.0"))
}
}
Expand Down

0 comments on commit 1e6c73b

Please sign in to comment.