Split generic Java setup from OSGi substitution setup

This commit is contained in:
Ben Liblit 2017-12-21 09:06:59 -06:00
parent 1ca17e93be
commit 9cd5d2ba56
1 changed files with 25 additions and 17 deletions

View File

@ -1,24 +1,8 @@
////////////////////////////////////////////////////////////////////////
//
// find platform-specific SWT implementations
// common Java setup shared by multiple projects
//
def osgi_platform
switch (System.getProperty('os.name')) {
case ~/Mac OS X/:
osgi_platform = 'cocoa.macosx.x86_64'
break
case ~/Windows.*/:
osgi_platform = 'win32.win32.x86_64'
break
case ~/Linux/:
osgi_platform = 'gtk.linux.x86_64'
break
}
System.setProperty('osgi.platform', osgi_platform)
subprojects { subproject ->
// skip generic Java setup for the few projects that have no Java code whatsoever
switch (subproject.name) {
@ -39,7 +23,31 @@ subprojects { subproject ->
url 'https://repo.eclipse.org/content/groups/releases/'
}
}
}
////////////////////////////////////////////////////////////////////////
//
// find platform-specific SWT implementations
//
def osgi_platform
switch (System.getProperty('os.name')) {
case ~/Mac OS X/:
osgi_platform = 'cocoa.macosx.x86_64'
break
case ~/Windows.*/:
osgi_platform = 'win32.win32.x86_64'
break
case ~/Linux/:
osgi_platform = 'gtk.linux.x86_64'
break
}
System.setProperty('osgi.platform', osgi_platform)
subprojects {
configurations.all {
resolutionStrategy {
// failOnVersionConflict()