diff --git a/build.gradle b/build.gradle index ece2000..25e9bff 100644 --- a/build.gradle +++ b/build.gradle @@ -10,34 +10,34 @@ mainClassName = 'com.webcodepro.applecommander.ui.AppleCommander' // Configure build for each supported platform ext { - os = System.getProperty("os.name").toLowerCase() - arch = System.getProperty("os.arch").toLowerCase() + os = System.getProperty("os.name").toLowerCase() + arch = System.getProperty("os.arch").toLowerCase() - // First let's sanitize arch - if (arch.contains("amd64")) { - swtArch = "x86_64" - } else if (arch.matches("i[3-6]86]")) { - swtArch = "x86" - } else { - swtArch = arch - } + // First let's sanitize arch + if (arch.contains("amd64")) { + swtArch = "x86_64" + } else if (arch.matches("i[3-6]86]")) { + swtArch = "x86" + } else { + swtArch = arch + } - if (os.contains("windows")) { - swtGUI = "win32.win32.$swtArch" - } else if (os.contains("mac os x")) { - swtGUI = "cocoa.macosx.$swtArch" - } else if (os.contains("linux")) { - swtGUI = "gtk.linux.$swtArch" - } else { - throw new GradleException("Don't know how to build for this platform:\n" + - " os = \"$os\"\n" + - " arch = \"$arch\"\n\n" + - "Edit build.gradle to add support") - /* At least you'll need to define swtGUI for your os and - * probably your arch too. Most SWT backend GUI descriptions - * take the form of ... - */ - } + if (os.contains("windows")) { + swtGUI = "win32.win32.$swtArch" + } else if (os.contains("mac os x")) { + swtGUI = "cocoa.macosx.$swtArch" + } else if (os.contains("linux")) { + swtGUI = "gtk.linux.$swtArch" + } else { + throw new GradleException("Don't know how to build for this platform:\n" + + " os = \"$os\"\n" + + " arch = \"$arch\"\n\n" + + "Edit build.gradle to add support") + /* At least you'll need to define swtGUI for your os and + * probably your arch too. Most SWT backend GUI descriptions + * take the form of ... + */ + } }