From eddc809d86cd70c6e4f450711ae68d20a06b83ec Mon Sep 17 00:00:00 2001
From: Nils Christian Ehmke <nie@informatik.uni-kiel.de>
Date: Sun, 22 Feb 2015 12:33:23 +0100
Subject: [PATCH] Modified the build script in order to semi-auto-detect the OS
 for the Eclipse library.

---
 build.gradle | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/build.gradle b/build.gradle
index dfa413b0..4b4e60f7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -34,8 +34,12 @@ configurations {
 
 dependencies {
 	// One of the runtime dependencies has to be used during the compilation. Modify this entry for Eclipse depending on your development JRE.
-	providedCompile 'org.eclipse.swt:org.eclipse.swt.win32.win32.x86_64:4.4'
-
+	if (System.properties['os.name'].toLowerCase().contains('windows')) {
+	    providedCompile 'org.eclipse.swt:org.eclipse.swt.win32.win32.x86_64:4.4'
+	} else {
+	    providedCompile 'org.eclipse.swt:org.eclipse.swt.gtk.linux.x86_64:4.4'
+	}
+	
 	windowsX86Runtime 'org.eclipse.swt:org.eclipse.swt.win32.win32.x86:4.4'
 	windowsX64Runtime 'org.eclipse.swt:org.eclipse.swt.win32.win32.x86_64:4.4'
 	linuxX86Runtime 'org.eclipse.swt:org.eclipse.swt.gtk.linux.x86:4.4'
@@ -209,4 +213,4 @@ task distSrcTar(type: Tar) {
 
 task distAllSrc(dependsOn: [distSrcZip, distSrcTar]) {
 	description = 'Bundles the source files of the project.'
-}
\ No newline at end of file
+}
-- 
GitLab