Switch to latest official SWT releases from Maven Central
simonbasle opened this issue · comments
SWT has started being officially distributed to Maven Central as of early 2017.
As a result, https://maven-eclipse.github.io/maven has not been updated in a while, and the build is currently outdated.
We could switch to latest SWT distribution using the swt platform
, which allows us to declare a dependency to an OS-independent artifact (which in turn declares a dependency to ${osgi.platform}
-dependent jar).
For compilation purposes, the osgi.plaftform must be substituted with a locally-relevant os-specific jar, like so:
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
substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') with module("org.eclipse.platform:org.eclipse.swt.${getSwtPlatform()}:${swtVersionPlatform}")
}
}
}
dependencies {
optional "org.eclipse.platform:org.eclipse.swt:${swtVersionPlatform}"
}
Latest swtVersionPlatform
is 3.112.0
. Notice the official Maven Central groupId is org.eclipse.platform
.
api-change
: not really API per-se, but the dependency to SWT would change.
superseded by #273