| 21 | 21 | } |
| 22 | 22 | |
| 23 | | String targetOs |
| 24 | | |
| 25 | | if (binding.hasVariable('targetOs') && "windows".equals(targetOs)) { |
| 26 | | targetOs = "win" |
| 27 | | } else { |
| 28 | | targetOs = "linux" |
| 29 | | |
| 30 | | def os = DefaultNativePlatform.currentOperatingSystem |
| 23 | // Assume an überjar unless targetOs is set. |
| 24 | String[] os = ["win", "mac", "linux"] |
| 31 | 25 | |
| 32 | | if (os.isMacOsX()) { |
| 33 | | targetOs = "mac" |
| 34 | | } else if (os.isWindows()) { |
| 35 | | targetOs = "win" |
| 26 | if (project.hasProperty('targetOs')) { |
| 27 | if ("windows".equals(targetOs)) { |
| 28 | os = ["win"] |
| 29 | } |
| 30 | else { |
| 31 | os = [targetOs] |
| 36 | 32 | } |
| 37 | 33 | } |
| ... |
| 105 | 101 | |
| 106 | 102 | fx.each { fxitem -> |
| 107 | | runtimeOnly "org.openjfx:javafx-${fxitem}:${javafx.version}:${targetOs}" |
| 103 | os.each { ositem -> |
| 104 | runtimeOnly "org.openjfx:javafx-${fxitem}:${javafx.version}:${ositem}" |
| 105 | } |
| 108 | 106 | } |
| 109 | 107 | |