-
-
Save jhyry-gcpud/3b07d9dd01bc49ec4f7bd445e27e42c0 to your computer and use it in GitHub Desktop.
SWT and JFace with Gradle and Kotlin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group 'example' | |
version '1.0-SNAPSHOT' | |
buildscript { | |
ext { | |
kotlin_version = '1.1.2-2' | |
osgi_platform = 'win32.win32.x86_64' | |
swt_version = '3.105.3' | |
} | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} | |
apply plugin: 'java' | |
apply plugin: 'kotlin' | |
sourceCompatibility = 1.8 | |
repositories { | |
mavenCentral() | |
} | |
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.$osgi_platform:$swt_version") | |
} | |
} | |
} | |
dependencies { | |
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" | |
compile "org.eclipse.platform:org.eclipse.jface:3.12.2" | |
compile "org.eclipse.platform:org.eclipse.swt:$swt_version" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment