mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-22 23:29:34 +00:00
d69c923bad
1. This change introduces the current SWT builds that exist in Maven; removing the need to locate and capture the JAR files. 2. The current SWT change is to capture the new Mac OS X aarch64 builds ("Apple Silicon"). 3. The current version of SWT, however, requires Java 11. 4. Due to the complexity of the prior Gradle build, it was restructured.
41 lines
1.2 KiB
Groovy
41 lines
1.2 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':lib:ac-api')
|
|
|
|
implementation "net.sf.applecommander:applesingle-api:$asVersion"
|
|
|
|
testImplementation "junit:junit:$junitVersion"
|
|
testImplementation "org.apache.commons:commons-lang3:$commonsLang3Version"
|
|
}
|
|
|
|
test {
|
|
String osName = System.getProperty('os.name').toLowerCase().split()[0]
|
|
String osArch = System.getProperty('os.arch').toLowerCase().split()[0]
|
|
String swtDependency
|
|
switch (osName) {
|
|
case 'windows':
|
|
swtDependency = "org.eclipse.platform:org.eclipse.swt.win32.win32.${osArch}:$swtVersion"
|
|
break
|
|
case 'linux':
|
|
swtDependency = "org.eclipse.platform:org.eclipse.swt.gtk.linux.${osArch}:$swtVersion"
|
|
break
|
|
case 'mac':
|
|
swtDependency = "org.eclipse.platform:org.eclipse.swt.cocoa.macosx.${osArch}:$swtVersion"
|
|
break
|
|
default:
|
|
throw new Exception('Unknown OS')
|
|
}
|
|
dependencies {
|
|
implementation("$swtDependency") {
|
|
exclude group: "org.eclipse.platform", module: "org.eclipse.swt"
|
|
}
|
|
}
|
|
}
|