diff options
author | Julien Gouesse <[email protected]> | 2021-09-04 01:52:47 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2021-09-04 01:52:47 +0200 |
commit | 0d3778a529cfd1fe0fea6ce9883e729ba6839716 (patch) | |
tree | 9f039e08d6deaba34d36ff18ff0f9851bb308e03 /build.gradle | |
parent | 38752a7146c4fb21ac3e118a7ffc7a8331a731e8 (diff) |
Fixes gradle build with Gradle 7.2
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle index 9316107..039f81c 100644 --- a/build.gradle +++ b/build.gradle @@ -24,13 +24,29 @@ artifacts.archives packageSources mavenLocal() maven { url "https://oss.sonatype.org/content/repositories/snapshots" } - maven { url "http://repo.maven.apache.org/maven2" } - maven { url "http://jogamp.org/deployment/maven" } + maven { url "https://repo.maven.apache.org/maven2" } + maven { url "https://jogamp.org/deployment/maven" } maven { url "https://swt-repo.googlecode.com/svn/repo/" } } configurations.all { -} + resolutionStrategy { + dependencySubstitution { + // The maven property ${osgi.platform} is not handled by Gradle + // so we replace the dependency, using the osgi platform from the project settings + def os = System.getProperty("os.name").toLowerCase() + if (os.contains("windows")) { + substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') with module("org.eclipse.platform:org.eclipse.swt.win32.win32.x86_64:3.106.3") + } + else if (os.contains("linux")) { + substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') with module("org.eclipse.platform:org.eclipse.swt.gtk.linux.x86_64:3.106.3") + } + else if (os.contains("mac")) { + substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') with module("org.eclipse.platform:org.eclipse.swt.cocoa.macosx.x86_64:3.106.3") + } + } + } + } dependencies { testImplementation group: 'junit', name: 'junit', version:'4.13.2' testImplementation group: 'org.easymock', name: 'easymock', version:'4.3' |