1 import org.apache.tools.ant.filters.ReplaceTokens
2 import org.gradle.internal.os.OperatingSystem
3 import org.gradle.plugins.ide.eclipse.model.Output
4 import org.gradle.plugins.ide.eclipse.model.Library
5 import java.security.MessageDigest
6 import groovy.transform.ExternalizeMethods
7 import groovy.util.XmlParser
8 import groovy.xml.XmlUtil
17 classpath 'org.openclover:clover:4.4.1'
26 id 'com.github.johnrengelman.shadow' version '4.0.3'
27 id 'com.install4j.gradle' version '8.0.4'
28 id 'com.dorongold.task-tree' version '1.5' // only needed to display task dependency tree with gradle task1 [task2 ...] taskTree
38 // in ext the values are cast to Object. Ensure string values are cast as String (and not GStringImpl) for later use
39 def string(Object o) {
40 return o == null ? "" : o.toString()
45 jalviewDirAbsolutePath = file(jalviewDir).getAbsolutePath()
46 jalviewDirRelativePath = jalviewDir
48 // local build environment properties
49 // can be "projectDir/local.properties"
50 def localProps = "${projectDir}/local.properties"
52 if (file(localProps).exists()) {
53 propsFile = localProps
55 // or "../projectDir_local.properties"
56 def dirLocalProps = projectDir.getParent() + "/" + projectDir.getName() + "_local.properties"
57 if (file(dirLocalProps).exists()) {
58 propsFile = dirLocalProps
60 if (propsFile != null) {
62 def p = new Properties()
63 def localPropsFIS = new FileInputStream(propsFile)
68 def oldval = findProperty(key)
71 println("Overriding property '${key}' ('${oldval}') with ${file(propsFile).getName()} value '${val}'")
73 println("Setting unknown property '${key}' with ${file(propsFile).getName()}s value '${val}'")
76 } catch (Exception e) {
77 System.out.println("Exception reading local.properties")
81 // this property set when running Eclipse headlessly
82 j2sHeadlessBuildProperty = string("net.sf.j2s.core.headlessbuild")
83 // this property set by Eclipse
84 eclipseApplicationProperty = string("eclipse.application")
85 // CHECK IF RUNNING FROM WITHIN ECLIPSE
86 def eclipseApplicationPropertyVal = System.properties[eclipseApplicationProperty]
87 IN_ECLIPSE = eclipseApplicationPropertyVal != null && eclipseApplicationPropertyVal.startsWith("org.eclipse.ui.")
88 // BUT WITHOUT THE HEADLESS BUILD PROPERTY SET
89 if (System.properties[j2sHeadlessBuildProperty].equals("true")) {
90 println("Setting IN_ECLIPSE to ${IN_ECLIPSE} as System.properties['${j2sHeadlessBuildProperty}'] == '${System.properties[j2sHeadlessBuildProperty]}'")
94 println("WITHIN ECLIPSE IDE")
96 println("HEADLESS BUILD")
99 System.properties.sort { it.key }.each {
100 key, val -> println("SYSTEM PROPERTY ${key}='${val}'")
103 if (false && IN_ECLIPSE) {
104 jalviewDir = jalviewDirAbsolutePath
109 bareSourceDir = string(source_dir)
110 sourceDir = string("${jalviewDir}/${bareSourceDir}")
111 resourceDir = string("${jalviewDir}/${resource_dir}")
112 bareTestSourceDir = string(test_source_dir)
113 testSourceDir = string("${jalviewDir}/${bareTestSourceDir}")
116 cloverInstrDir = file("${buildDir}/${cloverSourcesInstrDir}")
117 cloverDb = string("${buildDir}/clover/clover.db")
118 classesDir = string("${jalviewDir}/${classes_dir}")
119 if (clover.equals("true")) {
121 classesDir = string("${buildDir}/${cloverClassesDir}")
124 classesDir = string("${jalviewDir}/${classes_dir}")
129 getdownWebsiteDir = string("${jalviewDir}/${getdown_website_dir}/${JAVA_VERSION}")
132 // the following values might be overridden by the CHANNEL switch
133 getdownChannelName = CHANNEL.toLowerCase()
134 getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
135 getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
136 getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher}")
137 getdownAppDistDir = getdown_app_dir_alt
138 buildProperties = string("${classesDir}/${build_properties_file}")
139 reportRsyncCommand = false
140 jvlChannelName = CHANNEL.toLowerCase()
141 install4jSuffix = CHANNEL.substring(0, 1).toUpperCase() + CHANNEL.substring(1).toLowerCase(); // BUILD -> Build
142 install4jDSStore = "DS_Store-NON-RELEASE"
143 install4jDMGBackgroundImage = "jalview_dmg_background-NON-RELEASE.png"
144 install4jInstallerName = "${jalview_name} Non-Release Installer"
145 install4jExecutableName = jalview_name.replaceAll("[^\\w]+", "_").toLowerCase()
146 install4jExtraScheme = "jalviewx"
150 // TODO: get bamboo build artifact URL for getdown artifacts
151 getdown_channel_base = bamboo_channelbase
152 getdownChannelName = string("${bamboo_planKey}/${JAVA_VERSION}")
153 getdownAppBase = string("${bamboo_channelbase}/${bamboo_planKey}${bamboo_getdown_channel_suffix}/${JAVA_VERSION}")
154 jvlChannelName += "_${getdownChannelName}"
155 // automatically add the test group Not-bamboo for exclusion
156 if ("".equals(testngExcludedGroups)) {
157 testngExcludedGroups = "Not-bamboo"
159 install4jExtraScheme = "jalviewb"
163 getdownAppDistDir = getdown_app_dir_release
164 reportRsyncCommand = true
166 install4jDSStore = "DS_Store"
167 install4jDMGBackgroundImage = "jalview_dmg_background.png"
168 install4jInstallerName = "${jalview_name} Installer"
172 getdownChannelName = CHANNEL.toLowerCase()+"/${JALVIEW_VERSION}"
173 getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
174 getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
175 if (!file("${ARCHIVEDIR}/${packageDir}").exists()) {
176 throw new GradleException("Must provide an ARCHIVEDIR value to produce an archive distribution")
178 packageDir = string("${ARCHIVEDIR}/${packageDir}")
179 buildProperties = string("${ARCHIVEDIR}/${classes_dir}/${build_properties_file}")
182 reportRsyncCommand = true
183 install4jExtraScheme = "jalviewa"
187 getdownChannelName = string("archive/${JALVIEW_VERSION}")
188 getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
189 getdownAppBase = file(getdownWebsiteDir).toURI().toString()
190 if (!file("${ARCHIVEDIR}/${packageDir}").exists()) {
191 throw new GradleException("Must provide an ARCHIVEDIR value to produce an archive distribution")
193 packageDir = string("${ARCHIVEDIR}/${packageDir}")
194 buildProperties = string("${ARCHIVEDIR}/${classes_dir}/${build_properties_file}")
197 reportRsyncCommand = true
198 getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
199 install4jSuffix = "Archive"
200 install4jExtraScheme = "jalviewa"
204 reportRsyncCommand = true
205 install4jExtraScheme = "jalviewd"
209 reportRsyncCommand = true
210 JALVIEW_VERSION = "TEST"
211 install4jSuffix = "Test"
212 install4jDSStore = "DS_Store-TEST-RELEASE"
213 install4jDMGBackgroundImage = "jalview_dmg_background.png"
214 install4jExtraScheme = "jalviewt"
215 install4jInstallerName = "${jalview_name} Test Installer"
218 case ~/^SCRATCH(|-[-\w]*)$/:
219 getdownChannelName = CHANNEL
220 getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
221 getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
222 reportRsyncCommand = true
223 install4jSuffix = "Scratch"
227 if (!file("${LOCALDIR}").exists()) {
228 throw new GradleException("Must provide a LOCALDIR value to produce a local distribution")
230 getdownAppBase = file(file("${LOCALDIR}").getAbsolutePath()).toURI().toString()
231 getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
233 JALVIEW_VERSION = "TEST"
234 install4jSuffix = "Test-Local"
235 install4jDSStore = "DS_Store-TEST-RELEASE"
236 install4jDMGBackgroundImage = "jalview_dmg_background.png"
237 install4jExtraScheme = "jalviewt"
238 install4jInstallerName = "${jalview_name} Test Installer"
242 getdownAppBase = file(getdownWebsiteDir).toURI().toString()
243 getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
244 install4jExtraScheme = "jalviewl"
247 default: // something wrong specified
248 throw new GradleException("CHANNEL must be one of BUILD, RELEASE, ARCHIVE, DEVELOP, TEST-RELEASE, SCRATCH-..., LOCAL [default]")
252 // override getdownAppBase if requested
253 if (findProperty("getdown_appbase_override") != null) {
254 getdownAppBase = string(getProperty("getdown_appbase_override"))
255 println("Overriding getdown appbase with '${getdownAppBase}'")
257 // sanitise file name for jalview launcher file for this channel
258 jvlChannelName = jvlChannelName.replaceAll("[^\\w\\-]+", "_")
259 // install4j application and folder names
260 if (install4jSuffix == "") {
261 install4jApplicationName = "${jalview_name}"
262 install4jBundleId = "${install4j_bundle_id}"
264 install4jApplicationName = "${jalview_name} ${install4jSuffix}"
265 install4jBundleId = "${install4j_bundle_id}-" + install4jSuffix.toLowerCase()
267 // sanitise folder and id names
268 // install4jApplicationFolder = e.g. "Jalview Build"
269 install4jApplicationFolder = install4jApplicationName
270 .replaceAll("[\"'~:/\\\\]", "_") // replace all awkward filename chars " ' ~ : / \
271 .replaceAll("_+", "_") // collapse __
272 install4jInternalId = install4jApplicationFolder
274 .replaceAll("[^\\w\\-\\.]", "_") // replace other non [alphanumeric,_,-,.]
275 .replaceAll("_+", "_") // collapse __
276 .replaceAll("_*-_*", "-") // collapse _-_
277 install4jUnixApplicationFolder = install4jInternalId
280 getdownAppDir = string("${getdownWebsiteDir}/${getdownAppDistDir}")
281 //getdownJ11libDir = "${getdownWebsiteDir}/${getdown_j11lib_dir}"
282 getdownResourceDir = string("${getdownWebsiteDir}/${getdown_resource_dir}")
283 getdownInstallDir = string("${getdownWebsiteDir}/${getdown_install_dir}")
284 getdownFilesDir = string("${jalviewDir}/${getdown_files_dir}/${JAVA_VERSION}/")
285 getdownFilesInstallDir = string("${getdownFilesDir}/${getdown_install_dir}")
286 /* compile without modules -- using classpath libraries
287 modules_compileClasspath = fileTree(dir: "${jalviewDir}/${j11modDir}", include: ["*.jar"])
288 modules_runtimeClasspath = modules_compileClasspath
291 gitBranch = string("")
293 println("Using a ${CHANNEL} profile.")
295 additional_compiler_args = []
296 // configure classpath/args for j8/j11 compilation
297 if (JAVA_VERSION.equals("1.8")) {
298 JAVA_INTEGER_VERSION = string("8")
301 libDistDir = j8libDir
302 compile_source_compatibility = 1.8
303 compile_target_compatibility = 1.8
304 // these are getdown.txt properties defined dependent on the JAVA_VERSION
305 getdownAltJavaMinVersion = string(findProperty("getdown_alt_java8_min_version"))
306 getdownAltJavaMaxVersion = string(findProperty("getdown_alt_java8_max_version"))
307 // this property is assigned below and expanded to multiple lines in the getdown task
308 getdownAltMultiJavaLocation = string(findProperty("getdown_alt_java8_txt_multi_java_location"))
309 // this property is for the Java library used in eclipse
310 eclipseJavaRuntimeName = string("JavaSE-1.8")
311 } else if (JAVA_VERSION.equals("11")) {
312 JAVA_INTEGER_VERSION = string("11")
314 libDistDir = j11libDir
315 compile_source_compatibility = 11
316 compile_target_compatibility = 11
317 getdownAltJavaMinVersion = string(findProperty("getdown_alt_java11_min_version"))
318 getdownAltJavaMaxVersion = string(findProperty("getdown_alt_java11_max_version"))
319 getdownAltMultiJavaLocation = string(findProperty("getdown_alt_java11_txt_multi_java_location"))
320 eclipseJavaRuntimeName = string("JavaSE-11")
321 /* compile without modules -- using classpath libraries
322 additional_compiler_args += [
323 '--module-path', modules_compileClasspath.asPath,
324 '--add-modules', j11modules
327 } else if (JAVA_VERSION.equals("12") || JAVA_VERSION.equals("13")) {
328 JAVA_INTEGER_VERSION = JAVA_VERSION
330 libDistDir = j11libDir
331 compile_source_compatibility = JAVA_VERSION
332 compile_target_compatibility = JAVA_VERSION
333 getdownAltJavaMinVersion = string(findProperty("getdown_alt_java11_min_version"))
334 getdownAltJavaMaxVersion = string(findProperty("getdown_alt_java11_max_version"))
335 getdownAltMultiJavaLocation = string(findProperty("getdown_alt_java11_txt_multi_java_location"))
336 eclipseJavaRuntimeName = string("JavaSE-11")
337 /* compile without modules -- using classpath libraries
338 additional_compiler_args += [
339 '--module-path', modules_compileClasspath.asPath,
340 '--add-modules', j11modules
344 throw new GradleException("JAVA_VERSION=${JAVA_VERSION} not currently supported by Jalview")
349 JAVA_MIN_VERSION = JAVA_VERSION
350 JAVA_MAX_VERSION = JAVA_VERSION
351 def jreInstallsDir = string(jre_installs_dir)
352 if (jreInstallsDir.startsWith("~/")) {
353 jreInstallsDir = System.getProperty("user.home") + jreInstallsDir.substring(1)
355 macosJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-mac-x64/jre")
356 macosJavaVMTgz = string("${jreInstallsDir}/tgz/jre-${JAVA_INTEGER_VERSION}-mac-x64.tar.gz")
357 windowsJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-windows-x64/jre")
358 windowsJavaVMTgz = string("${jreInstallsDir}/tgz/jre-${JAVA_INTEGER_VERSION}-windows-x64.tar.gz")
359 linuxJavaVMDir = string("${jreInstallsDir}/jre-${JAVA_INTEGER_VERSION}-linux-x64/jre")
360 linuxJavaVMTgz = string("${jreInstallsDir}/tgz/jre-${JAVA_INTEGER_VERSION}-linux-x64.tar.gz")
361 install4jDir = string("${jalviewDir}/${install4j_utils_dir}")
362 install4jConfFileName = string("jalview-install4j-conf.install4j")
363 install4jConfFile = file("${install4jDir}/${install4jConfFileName}")
364 install4jHomeDir = install4j_home_dir
365 if (install4jHomeDir.startsWith("~/")) {
366 install4jHomeDir = System.getProperty("user.home") + install4jHomeDir.substring(1)
371 buildingHTML = string("${jalviewDir}/${docDir}/building.html")
372 helpFile = string("${classesDir}/${help_dir}/help.jhm")
373 helpParentDir = string("${jalviewDir}/${help_parent_dir}")
374 helpSourceDir = string("${helpParentDir}/${help_dir}")
377 relativeBuildDir = file(jalviewDirAbsolutePath).toPath().relativize(buildDir.toPath())
378 jalviewjsBuildDir = string("${relativeBuildDir}/jalviewjs")
379 jalviewjsSiteDir = string("${jalviewjsBuildDir}/${jalviewjs_site_dir}")
381 jalviewjsTransferSiteJsDir = string(jalviewjsSiteDir)
383 jalviewjsTransferSiteJsDir = string("${jalviewjsBuildDir}/tmp/${jalviewjs_site_dir}_js")
385 jalviewjsTransferSiteLibDir = string("${jalviewjsBuildDir}/tmp/${jalviewjs_site_dir}_lib")
386 jalviewjsTransferSiteSwingJsDir = string("${jalviewjsBuildDir}/tmp/${jalviewjs_site_dir}_swingjs")
387 jalviewjsTransferSiteCoreDir = string("${jalviewjsBuildDir}/tmp/${jalviewjs_site_dir}_core")
388 jalviewjsJalviewCoreHtmlFile = string("")
389 jalviewjsJalviewCoreName = string(jalviewjs_core_name)
390 jalviewjsCoreClasslists = []
391 jalviewjsJalviewTemplateName = string(jalviewjs_name)
392 jalviewjsJ2sSettingsFileName = string("${jalviewDir}/${jalviewjs_j2s_settings}")
393 jalviewjsJ2sProps = null
395 eclipseWorkspace = null
396 eclipseBinary = string("")
397 eclipseVersion = string("")
407 outputDir = file(classesDir)
412 srcDirs += helpParentDir
415 jar.destinationDir = file("${jalviewDir}/${packageDir}")
417 compileClasspath = files(sourceSets.main.java.outputDir)
418 //compileClasspath += files(sourceSets.main.resources.srcDirs)
419 compileClasspath += fileTree(dir: "${jalviewDir}/${libDir}", include: ["*.jar"])
421 runtimeClasspath = compileClasspath
426 srcDirs = [ cloverInstrDir ]
427 outputDir = file("${buildDir}/${cloverClassesDir}")
431 srcDirs = sourceSets.main.resources.srcDirs
433 compileClasspath = configurations.cloverRuntime + files( sourceSets.clover.java.outputDir )
434 compileClasspath += files(sourceSets.main.java.outputDir)
435 compileClasspath += sourceSets.main.compileClasspath
436 compileClasspath += fileTree(dir: "${jalviewDir}/${utilsDir}", include: ["**/*.jar"])
437 compileClasspath += fileTree(dir: "${jalviewDir}/${libDir}", include: ["*.jar"])
439 runtimeClasspath = compileClasspath
444 srcDirs testSourceDir
445 outputDir = file("${jalviewDir}/${testOutputDir}")
449 srcDirs = sourceSets.main.resources.srcDirs
452 compileClasspath = files( sourceSets.test.java.outputDir )
455 compileClasspath = sourceSets.clover.compileClasspath
457 compileClasspath += files(sourceSets.main.java.outputDir)
460 compileClasspath += fileTree(dir: "${jalviewDir}/${libDir}", include: ["*.jar"])
461 compileClasspath += fileTree(dir: "${jalviewDir}/${utilsDir}/testnglibs", include: ["**/*.jar"])
462 compileClasspath += fileTree(dir: "${jalviewDir}/${utilsDir}/testlibs", include: ["**/*.jar"])
464 runtimeClasspath = compileClasspath
472 cloverCompile 'org.openclover:clover:4.4.1'
473 testCompile 'org.openclover:clover:4.4.1'
479 cloverRuntime.extendsFrom cloverCompile
483 // eclipse project and settings files creation, also used by buildship
486 name = eclipse_project_name
488 natures 'org.eclipse.jdt.core.javanature',
489 'org.eclipse.jdt.groovy.core.groovyNature',
490 'org.eclipse.buildship.core.gradleprojectnature'
492 buildCommand 'org.eclipse.jdt.core.javabuilder'
493 buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
497 //defaultOutputDir = sourceSets.main.java.outputDir
500 if (it.isCanBeResolved()) {
505 minusConfigurations += removeThese
506 plusConfigurations = [ ]
510 def removeTheseToo = []
511 HashMap<String, Boolean> alreadyAddedSrcPath = new HashMap<>();
512 cp.entries.each { entry ->
513 // This conditional removes all src classpathentries that a) have already been added or b) aren't "src" or "test".
514 // e.g. this removes the resources dir being copied into bin/main, bin/test AND bin/clover
515 // we add the resources and help/help dirs in as libs afterwards (see below)
516 if (entry.kind == 'src') {
517 if (alreadyAddedSrcPath.getAt(entry.path) || !(entry.path == bareSourceDir || entry.path == bareTestSourceDir)) {
518 removeTheseToo += entry
520 alreadyAddedSrcPath.putAt(entry.path, true)
525 cp.entries.removeAll(removeTheseToo)
527 //cp.entries += new Output("${eclipse_bin_dir}/main")
528 if (file(helpParentDir).isDirectory()) {
529 cp.entries += new Library(fileReference(helpParentDir))
531 if (file(resourceDir).isDirectory()) {
532 cp.entries += new Library(fileReference(resourceDir))
535 HashMap<String, Boolean> alreadyAddedLibPath = new HashMap<>();
537 sourceSets.main.compileClasspath.findAll { it.name.endsWith(".jar") }.any {
538 //don't want to add outputDir as eclipse is using its own output dir in bin/main
539 if (it.isDirectory() || ! it.exists()) {
540 // don't add dirs to classpath, especially if they don't exist
541 return false // groovy "continue" in .any closure
543 def itPath = it.toString()
544 if (itPath.startsWith("${jalviewDirAbsolutePath}/")) {
545 // make relative path
546 itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
548 if (alreadyAddedLibPath.get(itPath)) {
549 //println("Not adding duplicate entry "+itPath)
551 //println("Adding entry "+itPath)
552 cp.entries += new Library(fileReference(itPath))
553 alreadyAddedLibPath.put(itPath, true)
557 sourceSets.test.compileClasspath.findAll { it.name.endsWith(".jar") }.any {
558 //no longer want to add outputDir as eclipse is using its own output dir in bin/main
559 if (it.isDirectory() || ! it.exists()) {
560 // don't add dirs to classpath
561 return false // groovy "continue" in .any closure
564 def itPath = it.toString()
565 if (itPath.startsWith("${jalviewDirAbsolutePath}/")) {
566 itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
568 if (alreadyAddedLibPath.get(itPath)) {
571 def lib = new Library(fileReference(itPath))
572 lib.entryAttributes["test"] = "true"
574 alreadyAddedLibPath.put(itPath, true)
582 containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
587 // for the IDE, use java 11 compatibility
588 sourceCompatibility = compile_source_compatibility
589 targetCompatibility = compile_target_compatibility
590 javaRuntimeName = eclipseJavaRuntimeName
592 // add in jalview project specific properties/preferences into eclipse core preferences
594 withProperties { props ->
595 def jalview_prefs = new Properties()
596 def ins = new FileInputStream("${jalviewDirAbsolutePath}/${eclipse_extra_jdt_prefs_file}")
597 jalview_prefs.load(ins)
599 jalview_prefs.forEach { t, v ->
600 if (props.getAt(t) == null) {
610 // Don't want these to be activated if in headless build
611 synchronizationTasks "eclipseSynchronizationTask"
612 autoBuildTasks "eclipseAutoBuildTask"
619 // only instrument source, we build test classes as normal
620 inputs.files files (sourceSets.main.allJava,sourceSets.test.allJava) // , fileTree(dir:"$jalviewDir/$testSourceDir", include: ["**/*.java"]))
621 outputs.dir cloverInstrDir
624 delete cloverInstrDir
629 cloverInstrDir.getPath(),
632 inputs.files.files.collect(
633 { file -> file.absolutePath }
636 String[] args = argsList.toArray()
637 println("About to instrument "+args.length +" files")
638 com.atlassian.clover.CloverInstr.mainImpl(args)
643 cloverClasses.dependsOn cloverInstr
647 group = "Verification"
648 description = "Creates the Clover report"
649 inputs.dir "${buildDir}/clover"
650 outputs.dir "${reportsDir}/clover"
652 file(cloverDb).exists()
659 "${reportsDir}/clover"
661 String[] args = argsList.toArray()
662 com.atlassian.clover.reporters.html.HtmlReporter.runReport(args)
664 // and generate ${reportsDir}/clover/clover.xml
669 "${reportsDir}/clover/clover.xml"
671 com.atlassian.clover.reporters.xml.XMLReporter.runReport(args)
679 sourceCompatibility = compile_source_compatibility
680 targetCompatibility = compile_target_compatibility
681 options.compilerArgs += additional_compiler_args
682 print ("Setting target compatibility to "+targetCompatibility+"\n")
684 classpath += configurations.cloverRuntime
690 delete cloverInstrDir
700 sourceCompatibility = compile_source_compatibility
701 targetCompatibility = compile_target_compatibility
702 options.compilerArgs = additional_compiler_args
703 print ("Setting target compatibility to "+targetCompatibility+"\n")
711 dependsOn compileCloverJava
712 classpath += configurations.cloverRuntime
714 classpath += sourceSets.main.runtimeClasspath
717 sourceCompatibility = compile_source_compatibility
718 targetCompatibility = compile_target_compatibility
719 options.compilerArgs = additional_compiler_args
720 print ("Setting target compatibility to "+targetCompatibility+"\n")
727 delete sourceSets.main.java.outputDir
733 dependsOn cleanClover
735 delete sourceSets.test.java.outputDir
740 // format is a string like date.format("dd MMMM yyyy")
741 def getDate(format) {
742 def date = new Date()
743 return date.format(format)
748 def hashStdOut = new ByteArrayOutputStream()
750 commandLine "git", "rev-parse", "--short", "HEAD"
751 standardOutput = hashStdOut
755 def branchStdOut = new ByteArrayOutputStream()
757 commandLine "git", "rev-parse", "--abbrev-ref", "HEAD"
758 standardOutput = branchStdOut
762 gitHash = hashStdOut.toString().trim()
763 gitBranch = branchStdOut.toString().trim()
765 outputs.upToDateWhen { false }
769 task createBuildProperties(type: WriteProperties) {
771 inputs.dir(sourceDir)
772 inputs.dir(resourceDir)
773 file(buildProperties).getParentFile().mkdirs()
774 outputFile (buildProperties)
775 // taking time specific comment out to allow better incremental builds
776 comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
777 //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
778 property "BUILD_DATE", getDate("HH:mm:ss dd MMMM yyyy")
779 property "VERSION", JALVIEW_VERSION
780 property "INSTALLATION", INSTALLATION+" git-commit:"+gitHash+" ["+gitBranch+"]"
781 outputs.file(outputFile)
785 task cleanBuildingHTML(type: Delete) {
792 task convertBuildingMD(type: Exec) {
793 dependsOn cleanBuildingHTML
794 def buildingMD = "${jalviewDir}/${docDir}/building.md"
795 def css = "${jalviewDir}/${docDir}/github.css"
798 pandoc_exec.split(",").each {
799 if (file(it.trim()).exists()) {
805 def hostname = "hostname".execute().text.trim()
806 def buildtoolsPandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc"
807 if ((pandoc == null || ! file(pandoc).exists()) && file(buildtoolsPandoc).exists()) {
808 pandoc = System.getProperty("user.home")+"/buildtools/pandoc/bin/pandoc"
812 if (pandoc != null && file(pandoc).exists()) {
813 commandLine pandoc, '-s', '-o', buildingHTML, '--metadata', 'pagetitle="Building Jalview from Source"', '--toc', '-H', css, buildingMD
815 println("Cannot find pandoc. Skipping convert building.md to HTML")
816 throw new StopExecutionException("Cannot find pandoc. Skipping convert building.md to HTML")
822 inputs.file(buildingMD)
824 outputs.file(buildingHTML)
835 task syncDocs(type: Sync) {
836 dependsOn convertBuildingMD
837 def syncDir = "${classesDir}/${docDir}"
838 from fileTree("${jalviewDir}/${docDir}")
844 task copyHelp(type: Copy) {
845 def inputDir = helpSourceDir
846 def outputDir = "${classesDir}/${help_dir}"
851 filter(ReplaceTokens,
855 'Version-Rel': JALVIEW_VERSION,
856 'Year-Rel': getDate("yyyy")
868 outputs.files(helpFile)
869 outputs.dir(outputDir)
873 task syncLib(type: Sync) {
874 def syncDir = "${classesDir}/${libDistDir}"
875 from fileTree("${jalviewDir}/${libDistDir}")
880 task syncResources(type: Sync) {
891 dependsOn syncResources
897 //testReportDirName = "test-reports" // note that test workingDir will be $jalviewDir
900 dependsOn compileJava
902 dependsOn cloverInstr
906 print("Running tests " + (use_clover?"WITH":"WITHOUT") + " clover [clover="+use_clover+"]\n")
910 includeGroups testngGroups
911 excludeGroups testngExcludedGroups
913 useDefaultListeners=true
916 maxHeapSize = "1024m"
918 workingDir = jalviewDir
919 //systemProperties 'clover.jar' System.properties.clover.jar
920 sourceCompatibility = compile_source_compatibility
921 targetCompatibility = compile_target_compatibility
922 jvmArgs += additional_compiler_args
927 task buildIndices(type: JavaExec) {
929 classpath = sourceSets.main.compileClasspath
930 main = "com.sun.java.help.search.Indexer"
931 workingDir = "${classesDir}/${help_dir}"
934 inputs.dir("${workingDir}/${argDir}")
936 outputs.dir("${classesDir}/doc")
937 outputs.dir("${classesDir}/help")
938 outputs.file("${workingDir}/JavaHelpSearch/DOCS")
939 outputs.file("${workingDir}/JavaHelpSearch/DOCS.TAB")
940 outputs.file("${workingDir}/JavaHelpSearch/OFFSETS")
941 outputs.file("${workingDir}/JavaHelpSearch/POSITIONS")
942 outputs.file("${workingDir}/JavaHelpSearch/SCHEMA")
943 outputs.file("${workingDir}/JavaHelpSearch/TMAP")
947 task compileLinkCheck(type: JavaCompile) {
949 classpath = files("${jalviewDir}/${utilsDir}")
950 destinationDir = file("${jalviewDir}/${utilsDir}")
951 source = fileTree(dir: "${jalviewDir}/${utilsDir}", include: ["HelpLinksChecker.java", "BufferedLineReader.java"])
953 inputs.file("${jalviewDir}/${utilsDir}/HelpLinksChecker.java")
954 inputs.file("${jalviewDir}/${utilsDir}/HelpLinksChecker.java")
955 outputs.file("${jalviewDir}/${utilsDir}/HelpLinksChecker.class")
956 outputs.file("${jalviewDir}/${utilsDir}/BufferedLineReader.class")
960 task linkCheck(type: JavaExec) {
961 dependsOn prepare, compileLinkCheck
963 def helpLinksCheckerOutFile = file("${jalviewDir}/${utilsDir}/HelpLinksChecker.out")
964 classpath = files("${jalviewDir}/${utilsDir}")
965 main = "HelpLinksChecker"
966 workingDir = jalviewDir
967 args = [ "${classesDir}/${help_dir}", "-nointernet" ]
969 def outFOS = new FileOutputStream(helpLinksCheckerOutFile, false) // false == don't append
971 standardOutput = new org.apache.tools.ant.util.TeeOutputStream(
974 errorOutput = new org.apache.tools.ant.util.TeeOutputStream(
978 inputs.dir("${classesDir}/${help_dir}")
979 outputs.file(helpLinksCheckerOutFile)
982 // import the pubhtmlhelp target
983 ant.properties.basedir = "${jalviewDir}"
984 ant.properties.helpBuildDir = "${jalviewDirAbsolutePath}/${classes_dir}/${help_dir}"
985 ant.importBuild "${utilsDir}/publishHelp.xml"
988 task cleanPackageDir(type: Delete) {
990 delete fileTree(dir: "${jalviewDir}/${packageDir}", include: "*.jar")
996 dependsOn buildIndices
997 dependsOn createBuildProperties
1000 attributes "Main-Class": mainClass,
1001 "Permissions": "all-permissions",
1002 "Application-Name": "Jalview Desktop",
1003 "Codebase": application_codebase
1006 destinationDir = file("${jalviewDir}/${packageDir}")
1007 archiveName = rootProject.name+".jar"
1013 exclude "**/*.jar.*"
1015 inputs.dir(classesDir)
1016 outputs.file("${jalviewDir}/${packageDir}/${archiveName}")
1020 task copyJars(type: Copy) {
1021 from fileTree(dir: classesDir, include: "**/*.jar").files
1022 into "${jalviewDir}/${packageDir}"
1026 // doing a Sync instead of Copy as Copy doesn't deal with "outputs" very well
1027 task syncJars(type: Sync) {
1028 from fileTree(dir: "${jalviewDir}/${libDistDir}", include: "**/*.jar").files
1029 into "${jalviewDir}/${packageDir}"
1031 include jar.archiveName
1038 description = "Put all required libraries in dist"
1039 // order of "cleanPackageDir", "copyJars", "jar" important!
1040 jar.mustRunAfter cleanPackageDir
1041 syncJars.mustRunAfter cleanPackageDir
1042 dependsOn cleanPackageDir
1045 outputs.dir("${jalviewDir}/${packageDir}")
1050 dependsOn cleanPackageDir
1056 group = "distribution"
1060 from ("${jalviewDir}/${libDistDir}") {
1064 attributes 'Implementation-Version': JALVIEW_VERSION
1066 mainClassName = shadowJarMainClass
1068 classifier = "all-"+JALVIEW_VERSION+"-j"+JAVA_VERSION
1073 task getdownWebsite() {
1074 group = "distribution"
1075 description = "Create the getdown minimal app folder, and website folder for this version of jalview. Website folder also used for offline app installer"
1080 def getdownWebsiteResourceFilenames = []
1081 def getdownTextString = ""
1082 def getdownResourceDir = getdownResourceDir
1083 def getdownResourceFilenames = []
1086 // clean the getdown website and files dir before creating getdown folders
1087 delete getdownWebsiteDir
1088 delete getdownFilesDir
1091 from buildProperties
1092 rename(build_properties_file, getdown_build_properties)
1095 getdownWebsiteResourceFilenames += "${getdownAppDistDir}/${getdown_build_properties}"
1097 // set some getdown_txt_ properties then go through all properties looking for getdown_txt_...
1098 def props = project.properties.sort { it.key }
1099 if (getdownAltJavaMinVersion != null && getdownAltJavaMinVersion.length() > 0) {
1100 props.put("getdown_txt_java_min_version", getdownAltJavaMinVersion)
1102 if (getdownAltJavaMaxVersion != null && getdownAltJavaMaxVersion.length() > 0) {
1103 props.put("getdown_txt_java_max_version", getdownAltJavaMaxVersion)
1105 if (getdownAltMultiJavaLocation != null && getdownAltMultiJavaLocation.length() > 0) {
1106 props.put("getdown_txt_multi_java_location", getdownAltMultiJavaLocation)
1109 props.put("getdown_txt_title", jalview_name)
1110 props.put("getdown_txt_ui.name", install4jApplicationName)
1112 // start with appbase
1113 getdownTextString += "appbase = ${getdownAppBase}\n"
1114 props.each{ prop, val ->
1115 if (prop.startsWith("getdown_txt_") && val != null) {
1116 if (prop.startsWith("getdown_txt_multi_")) {
1117 def key = prop.substring(18)
1118 val.split(",").each{ v ->
1119 def line = "${key} = ${v}\n"
1120 getdownTextString += line
1123 // file values rationalised
1124 if (val.indexOf('/') > -1 || prop.startsWith("getdown_txt_resource")) {
1126 if (val.indexOf('/') == 0) {
1129 } else if (val.indexOf('/') > 0) {
1130 // relative path (relative to jalviewDir)
1131 r = file( "${jalviewDir}/${val}" )
1134 val = "${getdown_resource_dir}/" + r.getName()
1135 getdownWebsiteResourceFilenames += val
1136 getdownResourceFilenames += r.getPath()
1139 if (! prop.startsWith("getdown_txt_resource")) {
1140 def line = prop.substring(12) + " = ${val}\n"
1141 getdownTextString += line
1147 getdownWebsiteResourceFilenames.each{ filename ->
1148 getdownTextString += "resource = ${filename}\n"
1150 getdownResourceFilenames.each{ filename ->
1153 into getdownResourceDir
1158 fileTree(file(packageDir)).each{ f ->
1159 if (f.isDirectory()) {
1160 def files = fileTree(dir: f, include: ["*"]).getFiles()
1162 } else if (f.exists()) {
1166 codeFiles.sort().each{f ->
1167 def name = f.getName()
1168 def line = "code = ${getdownAppDistDir}/${name}\n"
1169 getdownTextString += line
1176 // NOT USING MODULES YET, EVERYTHING SHOULD BE IN dist
1178 if (JAVA_VERSION.equals("11")) {
1179 def j11libFiles = fileTree(dir: "${jalviewDir}/${j11libDir}", include: ["*.jar"]).getFiles()
1180 j11libFiles.sort().each{f ->
1181 def name = f.getName()
1182 def line = "code = ${getdown_j11lib_dir}/${name}\n"
1183 getdownTextString += line
1186 into getdownJ11libDir
1192 // getdown-launcher.jar should not be in main application class path so the main application can move it when updated. Listed as a resource so it gets updated.
1193 //getdownTextString += "class = " + file(getdownLauncher).getName() + "\n"
1194 getdownTextString += "resource = ${getdown_launcher_new}\n"
1195 getdownTextString += "class = ${mainClass}\n"
1197 def getdown_txt = file("${getdownWebsiteDir}/getdown.txt")
1198 getdown_txt.write(getdownTextString)
1200 def getdownLaunchJvl = getdown_launch_jvl_name + ( (jvlChannelName != null && jvlChannelName.length() > 0)?"-${jvlChannelName}":"" ) + ".jvl"
1201 def launchJvl = file("${getdownWebsiteDir}/${getdownLaunchJvl}")
1202 launchJvl.write("appbase=${getdownAppBase}")
1205 from getdownLauncher
1206 rename(file(getdownLauncher).getName(), getdown_launcher_new)
1207 into getdownWebsiteDir
1211 from getdownLauncher
1212 if (file(getdownLauncher).getName() != getdown_launcher) {
1213 rename(file(getdownLauncher).getName(), getdown_launcher)
1215 into getdownWebsiteDir
1218 if (! (CHANNEL.startsWith("ARCHIVE") || CHANNEL.startsWith("DEVELOP"))) {
1221 from getdownLauncher
1222 from "${getdownWebsiteDir}/${getdown_build_properties}"
1223 if (file(getdownLauncher).getName() != getdown_launcher) {
1224 rename(file(getdownLauncher).getName(), getdown_launcher)
1226 into getdownInstallDir
1230 from getdownInstallDir
1231 into getdownFilesInstallDir
1238 from getdownLauncher
1239 from "${getdownWebsiteDir}/${getdown_build_properties}"
1240 if (file(getdownLauncher).getName() != getdown_launcher) {
1241 rename(file(getdownLauncher).getName(), getdown_launcher)
1243 into getdownFilesDir
1247 from getdownResourceDir
1248 into "${getdownFilesDir}/${getdown_resource_dir}"
1253 inputs.dir("${jalviewDir}/${packageDir}")
1255 outputs.dir(getdownWebsiteDir)
1256 outputs.dir(getdownFilesDir)
1260 // a helper task to allow getdown digest of any dir: `gradle getdownDigestDir -PDIGESTDIR=/path/to/my/random/getdown/dir
1261 task getdownDigestDir(type: JavaExec) {
1262 def digestDirPropertyName = "DIGESTDIR"
1263 description = "Digest a local dir (-P${digestDirPropertyName}=...) for getdown"
1265 classpath = files(getdownLauncher)
1266 def digestDir = findProperty(digestDirPropertyName)
1267 if (digestDir == null) {
1268 throw new GradleException("Must provide a DIGESTDIR value to produce an alternative getdown digest")
1272 main = "com.threerings.getdown.tools.Digester"
1276 task getdownDigest(type: JavaExec) {
1277 group = "distribution"
1278 description = "Digest the getdown website folder"
1279 dependsOn getdownWebsite
1281 classpath = files(getdownLauncher)
1283 main = "com.threerings.getdown.tools.Digester"
1284 args getdownWebsiteDir
1285 inputs.dir(getdownWebsiteDir)
1286 outputs.file("${getdownWebsiteDir}/digest2.txt")
1291 group = "distribution"
1292 description = "Create the minimal and full getdown app folder for installers and website and create digest file"
1293 dependsOn getdownDigest
1295 if (reportRsyncCommand) {
1296 def fromDir = getdownWebsiteDir + (getdownWebsiteDir.endsWith('/')?'':'/')
1297 def toDir = "${getdown_rsync_dest}/${getdownDir}" + (getdownDir.endsWith('/')?'':'/')
1298 println "LIKELY RSYNC COMMAND:"
1299 println "mkdir -p '$toDir'\nrsync -avh --delete '$fromDir' '$toDir'"
1300 if (RUNRSYNC == "true") {
1302 commandLine "mkdir", "-p", toDir
1305 commandLine "rsync", "-avh", "--delete", fromDir, toDir
1315 delete getdownWebsiteDir
1316 delete getdownFilesDir
1322 if (file(install4jHomeDir).exists()) {
1324 } else if (file(System.getProperty("user.home")+"/buildtools/install4j").exists()) {
1325 install4jHomeDir = System.getProperty("user.home")+"/buildtools/install4j"
1326 } else if (file("/Applications/install4j.app/Contents/Resources/app").exists()) {
1327 install4jHomeDir = "/Applications/install4j.app/Contents/Resources/app"
1329 installDir(file(install4jHomeDir))
1331 mediaTypes = Arrays.asList(install4j_media_types.split(","))
1335 task copyInstall4jTemplate {
1336 def install4jTemplateFile = file("${install4jDir}/${install4j_template}")
1337 def install4jFileAssociationsFile = file("${install4jDir}/${install4j_installer_file_associations}")
1338 inputs.file(install4jTemplateFile)
1339 inputs.file(install4jFileAssociationsFile)
1340 outputs.file(install4jConfFile)
1343 def install4jConfigXml = new XmlParser().parse(install4jTemplateFile)
1345 // turn off code signing if no OSX_KEYPASS
1346 if (OSX_KEYPASS == "") {
1347 install4jConfigXml.'**'.codeSigning.each { codeSigning ->
1348 codeSigning.'@macEnabled' = "false"
1350 install4jConfigXml.'**'.windows.each { windows ->
1351 windows.'@runPostProcessor' = "false"
1355 // turn off checksum creation for LOCAL channel
1356 def e = install4jConfigXml.application[0]
1357 if (CHANNEL == "LOCAL") {
1358 e.'@createChecksums' = "false"
1360 e.'@createChecksums' = "true"
1363 // put file association actions where placeholder action is
1364 def install4jFileAssociationsText = install4jFileAssociationsFile.text
1365 def fileAssociationActions = new XmlParser().parseText("<actions>${install4jFileAssociationsText}</actions>")
1366 install4jConfigXml.'**'.action.any { a ->
1367 if (a.'@name' == 'EXTENSIONS_REPLACED_BY_GRADLE') {
1368 def parent = a.parent()
1370 fileAssociationActions.each { faa ->
1373 // don't need to continue in .any loop once replacements have been made
1378 // write install4j file
1379 install4jConfFile.text = XmlUtil.serialize(install4jConfigXml)
1386 delete install4jConfFile
1391 task installers(type: com.install4j.gradle.Install4jTask) {
1392 group = "distribution"
1393 description = "Create the install4j installers"
1394 dependsOn setGitVals
1396 dependsOn copyInstall4jTemplate
1398 projectFile = install4jConfFile
1400 // create an md5 for the input files to use as version for install4j conf file
1401 def digest = MessageDigest.getInstance("MD5")
1403 (file("${install4jDir}/${install4j_template}").text +
1404 file("${install4jDir}/${install4j_info_plist_file_associations}").text +
1405 file("${install4jDir}/${install4j_installer_file_associations}").text).bytes)
1406 def filesMd5 = new BigInteger(1, digest.digest()).toString(16)
1407 if (filesMd5.length() >= 8) {
1408 filesMd5 = filesMd5.substring(0,8)
1410 def install4jTemplateVersion = "${JALVIEW_VERSION}_F${filesMd5}_C${gitHash}"
1411 // make install4jBuildDir relative to jalviewDir
1412 def install4jBuildDir = "${install4j_build_dir}/${JAVA_VERSION}"
1415 'JALVIEW_NAME': jalview_name,
1416 'JALVIEW_APPLICATION_NAME': install4jApplicationName,
1417 'JALVIEW_DIR': "../..",
1418 'OSX_KEYSTORE': OSX_KEYSTORE,
1419 'JSIGN_SH': JSIGN_SH,
1420 'JRE_DIR': getdown_app_dir_java,
1421 'INSTALLER_TEMPLATE_VERSION': install4jTemplateVersion,
1422 'JALVIEW_VERSION': JALVIEW_VERSION,
1423 'JAVA_MIN_VERSION': JAVA_MIN_VERSION,
1424 'JAVA_MAX_VERSION': JAVA_MAX_VERSION,
1425 'JAVA_VERSION': JAVA_VERSION,
1426 'JAVA_INTEGER_VERSION': JAVA_INTEGER_VERSION,
1427 'VERSION': JALVIEW_VERSION,
1428 'MACOS_JAVA_VM_DIR': macosJavaVMDir,
1429 'WINDOWS_JAVA_VM_DIR': windowsJavaVMDir,
1430 'LINUX_JAVA_VM_DIR': linuxJavaVMDir,
1431 'MACOS_JAVA_VM_TGZ': macosJavaVMTgz,
1432 'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz,
1433 'LINUX_JAVA_VM_TGZ': linuxJavaVMTgz,
1434 'COPYRIGHT_MESSAGE': install4j_copyright_message,
1435 'BUNDLE_ID': install4jBundleId,
1436 'INTERNAL_ID': install4jInternalId,
1437 'MACOS_DS_STORE': install4jDSStore,
1438 'MACOS_DMG_BG_IMAGE': install4jDMGBackgroundImage,
1439 'INSTALLER_NAME': install4jInstallerName,
1440 'INSTALL4J_UTILS_DIR': install4j_utils_dir,
1441 'GETDOWN_WEBSITE_DIR': getdown_website_dir,
1442 'GETDOWN_FILES_DIR': getdown_files_dir,
1443 'GETDOWN_RESOURCE_DIR': getdown_resource_dir,
1444 'GETDOWN_DIST_DIR': getdownAppDistDir,
1445 'GETDOWN_ALT_DIR': getdown_app_dir_alt,
1446 'GETDOWN_INSTALL_DIR': getdown_install_dir,
1447 'INFO_PLIST_FILE_ASSOCIATIONS_FILE': install4j_info_plist_file_associations,
1448 'BUILD_DIR': install4jBuildDir,
1449 'UNIX_DESKTOP_ADDITIONS': install4j_unix_desktop_additions,
1450 'APPLICATION_FOLDER': install4jApplicationFolder,
1451 'UNIX_APPLICATION_FOLDER': install4jUnixApplicationFolder,
1452 'EXECUTABLE_NAME': install4jExecutableName,
1453 'EXTRA_SCHEME': install4jExtraScheme,
1456 //println("INSTALL4J VARIABLES:")
1457 //variables.each{k,v->println("${k}=${v}")}
1459 destination = "${jalviewDir}/${install4jBuildDir}"
1460 buildSelected = true
1462 if (install4j_faster.equals("true") || CHANNEL.startsWith("LOCAL")) {
1464 disableSigning = true
1468 macKeystorePassword = OSX_KEYPASS
1472 println("Using projectFile "+projectFile)
1475 inputs.dir(getdownWebsiteDir)
1476 inputs.file(install4jConfFile)
1477 inputs.file("${install4jDir}/${install4j_info_plist_file_associations}")
1478 inputs.dir(macosJavaVMDir)
1479 inputs.dir(windowsJavaVMDir)
1480 outputs.dir("${jalviewDir}/${install4j_build_dir}/${JAVA_VERSION}")
1484 task sourceDist(type: Tar) {
1486 def VERSION_UNDERSCORES = JALVIEW_VERSION.replaceAll("\\.", "_")
1487 def outputFileName = "${project.name}_${VERSION_UNDERSCORES}.tar.gz"
1488 // cater for buildship < 3.1 [3.0.1 is max version in eclipse 2018-09]
1490 archiveFileName = outputFileName
1491 } catch (Exception e) {
1492 archiveName = outputFileName
1495 compression Compression.GZIP
1510 "**/*.class","$j11modDir/**/*.jar","appletlib","**/*locales",
1512 "utils/InstallAnywhere",
1527 "gradle.properties",
1538 ".settings/org.eclipse.jdt.core.jalview.prefs",
1542 exclude (EXCLUDE_FILES)
1543 include (PROCESS_FILES)
1544 filter(ReplaceTokens,
1548 'Version-Rel': JALVIEW_VERSION,
1549 'Year-Rel': getDate("yyyy")
1554 exclude (EXCLUDE_FILES)
1555 exclude (PROCESS_FILES)
1556 exclude ("appletlib")
1557 exclude ("**/*locales")
1558 exclude ("*locales/**")
1559 exclude ("utils/InstallAnywhere")
1561 exclude (getdown_files_dir)
1562 exclude (getdown_website_dir)
1564 // exluding these as not using jars as modules yet
1565 exclude ("$j11modDir/**/*.jar")
1568 include(INCLUDE_FILES)
1570 // from (jalviewDir) {
1571 // // explicit includes for stuff that seemed to not get included
1572 // include(fileTree("test/**/*."))
1573 // exclude(EXCLUDE_FILES)
1574 // exclude(PROCESS_FILES)
1581 dependsOn pubhtmlhelp
1583 inputs.dir("${classesDir}/${help_dir}")
1584 outputs.dir("${buildDir}/distributions/${help_dir}")
1587 // LARGE AMOUNT OF JALVIEWJS STUFF DELETED HERE
1588 task eclipseAutoBuildTask {}
1589 task eclipseSynchronizationTask {}