Skip to content

Commit

Permalink
Undo platform-specific bundles - doesn't save much
Browse files Browse the repository at this point in the history
  • Loading branch information
ultraq committed Mar 12, 2022
1 parent ff959c9 commit 393533a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 30 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Changelog
- Update LWJGL to 3.3.0+ and ImGui to 1.86.0+ for better support of M1 macs
(note that this is using Java 11 which only has an x86 release, so will be
running using Rosetta)
- Create platform-specific bundles to keep download size down
- Improve UI scaling to go with any OS display scaling settings

### 0.34.0
Expand Down
10 changes: 0 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@
* limitations under the License.
*/

import org.gradle.internal.os.OperatingSystem

def os = OperatingSystem.current()
def targetPlatform = findProperty('targetPlatform') ?:
os == OperatingSystem.MAC_OS ? 'macos' :
os == OperatingSystem.WINDOWS ? 'windows' :
System.getenv('CI') as boolean ? 'linux' :
null

// Global configuration
allprojects {
group = 'nz.net.ultraq.redhorizon'
Expand Down Expand Up @@ -55,7 +46,6 @@ subprojects {
reflectionsVersion = '0.10.2'
slf4jVersion = '1.7.32'
}
ext.targetPlatform = targetPlatform

dependencies {
implementation 'nz.net.ultraq.groovy:groovy-extensions:2.0.0'
Expand Down
19 changes: 9 additions & 10 deletions redhorizon-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ plugins {
id 'application'
}

import org.gradle.internal.os.OperatingSystem

def os = OperatingSystem.current()
def targetPlatform = findProperty('targetPlatform') ?:
os == OperatingSystem.MAC_OS ? 'macos' :
os == OperatingSystem.WINDOWS ? 'windows' :
System.getenv('CI') as boolean ? 'linux' :
null

dependencies {
implementation project(':redhorizon-classic')
implementation project(':redhorizon-engine')
Expand Down Expand Up @@ -46,12 +55,6 @@ application {
distributions {
main {
contents {
if (targetPlatform == 'windows') {
exclude 'bin/redhorizon'
}
else {
exclude 'bin/redhorizon.bat'
}
// Have to mention explicitly because of the subproject layout
from('..') {
include 'CHANGELOG.md'
Expand All @@ -65,7 +68,3 @@ distributions {
distTar {
enabled = false
}

distZip {
archiveClassifier = targetPlatform
}
16 changes: 7 additions & 9 deletions redhorizon-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

description = 'Core rendering engine for Red Horizon'

def lwjglNatives = "natives-${targetPlatform}"
def imguiNatives = "imgui-java-natives-${targetPlatform}"

dependencies {
implementation project(':redhorizon-events')
implementation project(':redhorizon-filetypes')
Expand All @@ -34,10 +31,11 @@ dependencies {
implementation 'org.lwjgl:lwjgl-opengl'
implementation "org.reflections:reflections:${reflectionsVersion}"

runtimeOnly "io.github.spair:${imguiNatives}:${imguiVersion}"
runtimeOnly "io.github.spair:${imguiNatives}:${imguiVersion}"
runtimeOnly "org.lwjgl:lwjgl::${lwjglNatives}"
runtimeOnly "org.lwjgl:lwjgl-glfw::${lwjglNatives}"
runtimeOnly "org.lwjgl:lwjgl-openal::${lwjglNatives}"
runtimeOnly "org.lwjgl:lwjgl-opengl::${lwjglNatives}"
['natives-macos', 'natives-windows'].each { natives ->
runtimeOnly "io.github.spair:imgui-java-${natives}:${imguiVersion}"
runtimeOnly "org.lwjgl:lwjgl::${natives}"
runtimeOnly "org.lwjgl:lwjgl-glfw::${natives}"
runtimeOnly "org.lwjgl:lwjgl-openal::${natives}"
runtimeOnly "org.lwjgl:lwjgl-opengl::${natives}"
}
}

0 comments on commit 393533a

Please sign in to comment.