2018-01-11 04:36:57 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// plugin configuration must precede everything else
|
|
|
|
//
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id 'com.github.hauner.jarTest' version '1.0.1' apply false
|
|
|
|
id 'de.undercouch.download' version '3.3.0' apply false
|
|
|
|
id 'nebula.lint' version '8.3.1'
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-19 22:31:44 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2017-12-21 15:06:59 +00:00
|
|
|
// common Java setup shared by multiple projects
|
2017-12-19 22:31:44 +00:00
|
|
|
//
|
|
|
|
|
2017-12-15 19:27:08 +00:00
|
|
|
subprojects { subproject ->
|
|
|
|
// skip generic Java setup for the few projects that have no Java code whatsoever
|
|
|
|
switch (subproject.name) {
|
|
|
|
case 'com.ibm.wala-repository':
|
|
|
|
case 'com.ibm.wala.cast.js.test.data':
|
|
|
|
case ~/.*_feature/:
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'java'
|
|
|
|
|
2018-01-09 06:26:12 +00:00
|
|
|
sourceCompatibility = 1.8
|
|
|
|
|
2017-12-15 19:27:08 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven {
|
|
|
|
url 'https://artifacts.alfresco.com/nexus/content/repositories/public/'
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
url 'https://repo.eclipse.org/content/groups/releases/'
|
|
|
|
}
|
|
|
|
}
|
2017-12-21 15:06:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// 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)
|
2017-12-15 19:27:08 +00:00
|
|
|
|
2017-12-21 15:06:59 +00:00
|
|
|
subprojects {
|
2017-12-15 19:27:08 +00:00
|
|
|
configurations.all {
|
|
|
|
resolutionStrategy {
|
|
|
|
// failOnVersionConflict()
|
|
|
|
dependencySubstitution {
|
|
|
|
substitute module('org.eclipse.platform:org.eclipse.swt.${osgi.platform}') with module("org.eclipse.platform:org.eclipse.swt.${System.getProperty('osgi.platform')}:3.+")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-12-19 16:17:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
2017-12-19 22:31:44 +00:00
|
|
|
//
|
|
|
|
// optional lint checking of Gradle scripts
|
|
|
|
//
|
2017-12-19 16:17:47 +00:00
|
|
|
|
|
|
|
allprojects {
|
|
|
|
apply plugin: 'nebula.lint'
|
2017-12-21 15:29:14 +00:00
|
|
|
gradleLint.alwaysRun = true
|
2017-12-21 15:07:48 +00:00
|
|
|
gradleLint {
|
|
|
|
rules = ['all-dependency']
|
|
|
|
excludedRules = [
|
|
|
|
'duplicate-dependency-class',
|
|
|
|
'transitive-duplicate-dependency-class',
|
|
|
|
]
|
|
|
|
}
|
2017-12-19 16:17:47 +00:00
|
|
|
}
|
2017-12-19 22:32:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// disable Javadoc linter until documentation is in better shape
|
|
|
|
//
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
tasks.withType(Javadoc) {
|
|
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
|
|
}
|
|
|
|
}
|