1 import org.apache.tools.ant.filters.ReplaceTokens
2 import org.gradle.internal.os.OperatingSystem
6 classpath 'org.openclover:clover:4.3.1'
7 classpath 'org.apache.commons:commons-compress:1.18'
15 id 'com.github.johnrengelman.shadow' version '4.0.3'
16 id 'com.install4j.gradle' version '7.0.9'
28 mainClassName = launcherClass
29 def cloverInstrDir = file("$buildDir/$cloverSourcesInstrDir")
30 def classes = "$jalviewDir/$classesDir"
32 if (clover.equals("true")) {
34 classes = "$buildDir/$cloverClassesDir"
37 classes = "$jalviewDir/$classesDir"
40 // configure classpath/args for j8/j11 compilation
42 def jalviewDirAbsolutePath = file(jalviewDir).getAbsolutePath()
45 def compile_source_compatibility
46 def compile_target_compatibility
49 // where the getdown channel will be built.
50 // TODO: consider allowing this expression to be overrriden by -P arg
51 getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION + '/'
52 getdownAppDir = getdownWebsiteDir + '/' + getdown_app_dir
53 getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir
54 getdownResourceDir = getdownWebsiteDir + '/' + getdown_resource_dir
55 getdownLauncher = jalviewDir + '/' + getdown_launcher
56 getdownFilesDir = jalviewDir + '/' + getdown_files_dir + '/' + JAVA_VERSION + '/'
57 getdownLib1 = jalviewDir + '/' + getdown_lib1
58 def getdownChannel = getdown_channel_name
59 if (getdown_channel_name.equals("COMMIT")) {
60 getdownChannel = getGitHash()
62 getdown_app_base = getdown_channel_base+"/"+getdownChannel+"/"+JAVA_VERSION+"/"
63 modules_compileClasspath = fileTree(dir: "$jalviewDir/$j11modDir", include: ["*.jar"])
64 modules_runtimeClasspath = modules_compileClasspath
67 def additional_compiler_args = []
68 // these are getdown.txt properties defined dependent on the JAVA_VERSION
69 def getdown_alt_java_min_version
70 // this property is assigned below and expanded to multiple lines in the getdown task
71 def getdown_alt_multi_java_location
72 if (JAVA_VERSION.equals("1.8")) {
75 compile_source_compatibility = 1.8
76 compile_target_compatibility = 1.8
77 getdown_alt_java_min_version = getdown_alt_java8_min_version
78 getdown_alt_multi_java_location = getdown_alt_java8_txt_multi_java_location
79 } else if (JAVA_VERSION.equals("11")) {
81 libDistDir = j11libDir
82 compile_source_compatibility = 11
83 compile_target_compatibility = 11
84 getdown_alt_java_min_version = getdown_alt_java11_min_version
85 getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
86 additional_compiler_args += [
87 '--module-path', ext.modules_compileClasspath.asPath,
88 '--add-modules', j11modules
91 throw new GradleException("JAVA_VERSION=$JAVA_VERSION not currently supported by Jalview")
98 srcDirs "$jalviewDir/$sourceDir"
99 outputDir = file("$classes")
103 srcDirs "$jalviewDir/$resourceDir"
104 srcDirs "$jalviewDir/$libDistDir"
107 jar.destinationDir = file("$jalviewDir/$packageDir")
109 compileClasspath = files(sourceSets.main.java.outputDir)
110 compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
112 runtimeClasspath = compileClasspath
116 srcDirs = [ cloverInstrDir ]
117 outputDir = file("${buildDir}/${cloverClassesDir}")
121 srcDirs = sourceSets.main.resources.srcDirs
123 compileClasspath = configurations.cloverRuntime + files( sourceSets.clover.java.outputDir )
124 compileClasspath += files(sourceSets.main.java.outputDir)
125 compileClasspath += sourceSets.main.compileClasspath
126 compileClasspath += fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"])
127 compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
129 runtimeClasspath = compileClasspath
134 srcDirs "$jalviewDir/$testSourceDir"
135 outputDir = file("$jalviewDir/$testOutputDir")
139 srcDirs = sourceSets.main.resources.srcDirs
142 compileClasspath = files( sourceSets.test.java.outputDir )
145 compileClasspath += sourceSets.clover.compileClasspath
147 compileClasspath += files(sourceSets.main.java.outputDir)
149 compileClasspath += sourceSets.main.compileClasspath
150 compileClasspath += files( sourceSets.main.resources.srcDirs)
151 compileClasspath += fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"])
152 compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
154 runtimeClasspath = compileClasspath
161 cloverCompile 'org.openclover:clover:4.3.1'
162 testCompile 'org.openclover:clover:4.3.1'
168 cloverRuntime.extendsFrom cloverCompile
173 name = "Jalview with gradle build"
175 natures 'org.eclipse.jdt.core.javanature',
176 'org.eclipse.jdt.groovy.core.groovyNature',
177 'org.eclipse.buildship.core.gradleprojectnature'
179 buildCommand 'org.eclipse.jdt.core.javabuilder'
180 buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
184 //defaultOutputDir = sourceSets.main.java.outputDir
186 configurations.each{ if (it.isCanBeResolved()) {
190 containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
192 minusConfigurations += removeThese
193 plusConfigurations = [ ]
197 def removeTheseToo = []
198 HashMap<String, Boolean> addedSrcPath = new HashMap<>();
199 cp.entries.each { entry ->
200 if (entry.kind == 'src') {
201 if (addedSrcPath.getAt(entry.path) || !(entry.path == "src" || entry.path == "test" || entry.path == "resources")) {
202 removeTheseToo += entry
204 addedSrcPath.putAt(entry.path, true)
208 cp.entries.removeAll(removeTheseToo)
212 def node = it.asNode()
213 def srcTestAttributes
214 node.children().each{ cpe ->
215 def attributes = cpe.attributes()
216 if (attributes.get("kind") == "src" && attributes.get("path") == "test") {
217 srcTestAttributes = cpe.find { a -> a.name() == "attributes" }
221 def addTestAttribute = true
222 srcTestAttributes.each{a ->
223 if (a.name() == "attribute" && a.attributes().getAt("name") == "test") {
224 addTestAttribute = false
227 if (addTestAttribute) {
228 srcTestAttributes.append(new Node(null, "attribute", [name:"test", value:"true"]))
231 node.appendNode('classpathentry', [kind:"output", path:"bin/main"])
232 HashMap<String, Boolean> addedLibPath = new HashMap<>();
233 def allPaths = sourceSets.test.compileClasspath + sourceSets.main.compileClasspath
234 sourceSets.main.compileClasspath.each{
235 //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
236 //no longer want to add outputDir as eclipse is using its own output dir in bin/main
237 if (it.isDirectory() || ! it.exists()) {
238 // don't add dirs to classpath
239 //println("Not adding directory "+it)
242 def itPath = it.toString()
243 if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
244 itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
246 if (addedLibPath.get(itPath)) {
247 //println("Not adding duplicate entry "+itPath)
249 //println("Adding entry "+itPath)
250 node.appendNode('classpathentry', [kind:"lib", path:itPath])
251 addedLibPath.put(itPath, true)
254 sourceSets.test.compileClasspath.each{
255 //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
256 //no longer want to add outputDir as eclipse is using its own output dir in bin/main
257 if (it.isDirectory() || ! it.exists()) {
258 // don't add dirs to classpath
259 //println("Not adding directory "+it)
262 def itPath = it.toString()
263 if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
264 itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
266 if (addedLibPath.get(itPath)) {
267 //println("Not adding duplicate entry "+itPath)
269 //println("Adding entry "+itPath)
270 node.appendNode('classpathentry', [kind:"lib", path:itPath])
271 .appendNode('attributes')
272 .appendNode('attribute', [name:"test", value:"true"])
273 addedLibPath.put(itPath, true)
282 // for the IDE, use java 11 compatibility
283 sourceCompatibility = 11
284 targetCompatibility = 11
285 javaRuntimeName = "JavaSE-11"
288 withProperties { props ->
289 def jalview_prefs = new Properties()
290 def ins = new FileInputStream(eclipse_extra_jdt_prefs_file)
291 jalview_prefs.load(ins)
293 jalview_prefs.forEach { t, v ->
294 if (props.getAt(t) == null) {
305 // only instrument source, we build test classes as normal
306 inputs.files files (sourceSets.main.allJava) // , fileTree(dir:"$jalviewDir/$testSourceDir", include: ["**/*.java"]))
307 outputs.dir cloverInstrDir
310 delete cloverInstrDir
311 def argsList = ["--initstring", "${buildDir}/clover/clover.db",
312 "-d", "${buildDir}/${cloverSourcesInstrDir}"]
313 argsList.addAll(inputs.files.files.collect({ file ->
316 String[] args = argsList.toArray()
317 println("About to instrument "+args.length +" files")
318 com.atlassian.clover.CloverInstr.mainImpl(args)
324 group = "Verification"
325 description = "Createst the Clover report"
326 inputs.dir "${buildDir}/clover"
327 outputs.dir "${reportsDir}/clover"
329 file("${buildDir}/clover/clover.db").exists()
332 def argsList = ["--initstring", "${buildDir}/clover/clover.db",
333 "-o", "${reportsDir}/clover"]
334 String[] args = argsList.toArray()
335 com.atlassian.clover.reporters.html.HtmlReporter.runReport(args)
337 // and generate ${reportsDir}/clover/clover.xml
338 args = ["--initstring", "${buildDir}/clover/clover.db",
339 "-o", "${reportsDir}/clover/clover.xml"].toArray()
340 com.atlassian.clover.reporters.xml.XMLReporter.runReport(args)
350 sourceCompatibility = compile_source_compatibility
351 targetCompatibility = compile_target_compatibility
352 options.compilerArgs = additional_compiler_args
353 print ("Setting target compatibility to "+targetCompatibility+"\n")
360 dependsOn compileCloverJava
361 classpath += configurations.cloverRuntime
363 classpath += sourceSets.main.runtimeClasspath
366 sourceCompatibility = compile_source_compatibility
367 targetCompatibility = compile_target_compatibility
368 options.compilerArgs = additional_compiler_args
369 print ("Setting target compatibility to "+targetCompatibility+"\n")
377 sourceCompatibility = compile_source_compatibility
378 targetCompatibility = compile_target_compatibility
379 options.compilerArgs += additional_compiler_args
380 print ("Setting target compatibility to "+targetCompatibility+"\n")
382 classpath += configurations.cloverRuntime
386 delete sourceSets.main.java.outputDir
390 delete sourceSets.test.java.outputDir
391 delete cloverInstrDir
394 def getDate(format) {
395 def date = new Date()
396 //return date.format("dd MMMM yyyy")
397 return date.format(format)
401 def stdout = new ByteArrayOutputStream()
403 commandLine "git", "rev-parse", "--short", "HEAD"
404 standardOutput = stdout
405 workingDir = jalviewDir
407 return stdout.toString().trim()
411 def stdout = new ByteArrayOutputStream()
413 commandLine "git", "rev-parse", "--abbrev-ref", "HEAD"
414 standardOutput = stdout
415 workingDir = jalviewDir
417 return stdout.toString().trim()
420 task createBuildProperties(type: WriteProperties) {
421 inputs.dir("$jalviewDir/$sourceDir")
422 inputs.dir("$jalviewDir/$resourceDir")
423 outputFile "$classes/$buildPropertiesFile"
424 /* taking time/date specific comment out to allow better incremental builds */
425 //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
426 comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
427 property "BUILD_DATE", getDate("dd MMMM yyyy")
428 property "VERSION", JALVIEW_VERSION
429 property "INSTALLATION", INSTALLATION+" git-commit:"+getGitHash()+" ["+getGitBranch()+"]"
430 outputs.file(outputFile)
431 outputs.dir("$classes")
434 task syncDocs(type: Sync) {
435 def syncDir = "$classes/$docDir"
436 from fileTree("$jalviewDir/$docDir")
441 def helpFile = "$classes/$helpDir/help.jhm"
442 task syncHelp(type: Sync) {
443 inputs.files("$jalviewDir/$helpDir")
444 outputs.files(helpFile)
446 def syncDir = "$classes/$helpDir"
447 from fileTree("$jalviewDir/$helpDir")
451 task copyHelp(type: Copy) {
452 def inputDir = "$jalviewDir/$helpDir"
453 def outputDir = "$classes/$helpDir"
456 filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['Version-Rel': "USING_FILTER"])
458 outputs.files(helpFile)
459 outputs.dir(outputDir)
462 task syncLib(type: Sync) {
463 def syncDir = "$classes/$libDistDir"
464 from fileTree("$jalviewDir/$libDistDir")
468 task syncResources(type: Sync) {
469 from "$jalviewDir/$resourceDir"
479 dependsOn syncResources
485 //testReportDirName = "test-reports" // note that test workingDir will be $jalviewDir
488 dependsOn compileJava
490 dependsOn cloverInstr
493 print("Running tests " + (use_clover?"WITH":"WITHOUT") + " clover [clover="+use_clover+"]\n")
496 includeGroups testngGroups
498 useDefaultListeners=true
501 workingDir = jalviewDir
502 //systemProperties 'clover.jar' System.properties.clover.jar
503 sourceCompatibility = compile_source_compatibility
504 targetCompatibility = compile_target_compatibility
505 jvmArgs += additional_compiler_args
506 print ("Setting target compatibility to "+targetCompatibility+"\n")
509 task buildIndices(type: JavaExec) {
511 classpath = sourceSets.main.compileClasspath
512 main = "com.sun.java.help.search.Indexer"
513 workingDir = "$classes/$helpDir"
516 inputs.dir("$workingDir/$argDir")
518 outputs.dir("$classes/doc")
519 outputs.dir("$classes/help")
520 outputs.file("$workingDir/JavaHelpSearch/DOCS")
521 outputs.file("$workingDir/JavaHelpSearch/DOCS.TAB")
522 outputs.file("$workingDir/JavaHelpSearch/OFFSETS")
523 outputs.file("$workingDir/JavaHelpSearch/POSITIONS")
524 outputs.file("$workingDir/JavaHelpSearch/SCHEMA")
525 outputs.file("$workingDir/JavaHelpSearch/TMAP")
528 task compileLinkCheck(type: JavaCompile) {
530 classpath = files("$jalviewDir/$utilsDir")
531 destinationDir = file("$jalviewDir/$utilsDir")
532 source = fileTree(dir: "$jalviewDir/$utilsDir", include: ["HelpLinksChecker.java", "BufferedLineReader.java"])
534 outputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.class")
535 outputs.file("$jalviewDir/$utilsDir/BufferedLineReader.class")
538 def helplinkscheckeroutputfile = file("$jalviewDir/$utilsDir/HelpLinksChecker.out")
539 task linkCheck(type: JavaExec) {
540 dependsOn prepare, compileLinkCheck
541 classpath = files("$jalviewDir/$utilsDir")
542 main = "HelpLinksChecker"
543 workingDir = jalviewDir
544 def help = "$classes/$helpDir"
545 args = [ "$classes/$helpDir", "-nointernet" ]
546 //args = [ "$classesDir/$helpDir", "-nointernet" ]
549 helplinkscheckeroutputfile.createNewFile()
550 standardOutput new FileOutputStream(helplinkscheckeroutputfile, false)
553 outputs.file(helplinkscheckeroutputfile)
556 task cleanPackageDir(type: Delete) {
557 delete fileTree("$jalviewDir/$packageDir").include("*.jar")
562 dependsOn buildIndices
563 dependsOn createBuildProperties
566 attributes "Main-Class": mainClass,
567 "Permissions": "all-permissions",
568 "Application-Name": "Jalview Desktop",
569 "Codebase": application_codebase
572 destinationDir = file("$jalviewDir/$packageDir")
573 archiveName = rootProject.name+".jar"
581 inputs.dir("$classes")
582 outputs.file("$jalviewDir/$packageDir/$archiveName")
585 task copyJars(type: Copy) {
586 from fileTree("$classes").include("**/*.jar").include("*.jar").files
587 into "$jalviewDir/$packageDir"
590 // doing a Sync instead of Copy as Copy doesn't deal with "outputs" very well
591 task syncJars(type: Sync) {
592 from fileTree("$jalviewDir/$libDistDir").include("**/*.jar").include("*.jar").files
593 into "$jalviewDir/$packageDir"
595 include jar.archiveName
601 description = "Put all required libraries in dist"
602 // order of "cleanPackageDir", "copyJars", "jar" important!
603 jar.mustRunAfter cleanPackageDir
604 syncJars.mustRunAfter cleanPackageDir
605 dependsOn cleanPackageDir
608 outputs.dir("$jalviewDir/$packageDir")
612 dependsOn cleanPackageDir
619 from ("$jalviewDir/$libDistDir") {
622 mainClassName = shadowJarMainClass
624 classifier = "all-"+JAVA_VERSION
628 task getdownWebsite() {
629 group = "distribution"
630 description = "Create the getdown minimal app folder, and website folder for this version of jalview. Website folder also used for offline app installer"
632 def getdownWebsiteResourceFilenames = []
633 def getdownTextString = ""
634 def getdownResourceDir = project.ext.getdownResourceDir
635 def getdownAppDir = project.ext.getdownAppDir
636 def getdownResourceFilenames = []
638 // go through properties looking for getdown_txt_...
639 def props = project.properties.sort { it.key }
640 props.put("getdown_txt_java_min_version", getdown_alt_java_min_version)
641 props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
643 props.put("getdown_txt_appbase", getdown_app_base)
644 props.each{ prop, val ->
645 if (prop.startsWith("getdown_txt_") && val != null) {
646 if (prop.startsWith("getdown_txt_multi_")) {
647 def key = prop.substring(18)
648 val.split(",").each{ v ->
649 def line = key + " = " + v + "\n"
650 getdownTextString += line
653 // file values rationalised
654 if (val.indexOf('/') > -1) {
656 if (val.indexOf('/') == 0) {
659 } else if (val.indexOf('/') > 0) {
660 // relative path (relative to jalviewDir)
661 r = file( jalviewDir + '/' + val )
664 val = getdown_resource_dir + '/' + r.getName()
665 getdownWebsiteResourceFilenames += val
666 getdownResourceFilenames += r.getPath()
669 def line = prop.substring(12) + " = " + val + "\n"
670 getdownTextString += line
675 getdownWebsiteResourceFilenames.each{ filename ->
676 getdownTextString += "resource = "+filename+"\n"
678 getdownResourceFilenames.each{ filename ->
681 into project.ext.getdownResourceDir
686 makeDist.outputs.files.each{ f ->
687 if (f.isDirectory()) {
688 def files = fileTree(dir: f, include: ["*"]).getFiles()
690 } else if (f.exists()) {
694 codeFiles.sort().each{f ->
695 def line = "code = " + getdown_app_dir + '/' + f.getName() + "\n"
696 getdownTextString += line
699 into project.ext.getdownAppDir
703 // NOT USING MODULES YET, EVERYTHING SHOULD BE IN dist
705 if (JAVA_VERSION.equals("11")) {
706 def j11libFiles = fileTree(dir: "$jalviewDir/$j11libDir", include: ["*.jar"]).getFiles()
707 j11libFiles.sort().each{f ->
708 def line = "code = " + getdown_j11lib_dir + '/' + f.getName() + "\n"
709 getdownTextString += line
712 into project.ext.getdownJ11libDir
718 getdownTextString += "code = " + file(getdownLauncher).getName() + "\n"
719 getdownTextString += "class = " + mainClass + "\n"
721 def getdown_txt = file(project.ext.getdownWebsiteDir + "/getdown.txt")
722 getdown_txt.write(getdownTextString)
726 into project.ext.getdownFilesDir
731 into project.ext.getdownFilesDir
736 into project.ext.getdownWebsiteDir
741 into project.ext.getdownFilesDir + '/' + packageDir
745 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.background_image')
746 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.error_background')
747 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.progress_image')
748 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.icon')
749 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.mac_dock_icon')
750 into project.ext.getdownFilesDir + '/' + getdown_resource_dir
754 inputs.dir(jalviewDir + '/' + packageDir)
755 outputs.dir(project.ext.getdownWebsiteDir)
756 outputs.dir(project.ext.getdownFilesDir)
759 task getdownDigest(type: JavaExec) {
760 group = "distribution"
761 description = "Digest the getdown website folder"
762 dependsOn getdownWebsite
763 classpath = files(jalviewDir + '/' + getdown_core)
764 classpath file(jalviewDir + '/' + getdown_lib1)
765 main = "com.threerings.getdown.tools.Digester"
766 args project.ext.getdownWebsiteDir
767 outputs.file(project.ext.getdownWebsiteDir + '/' + "digest2.txt")
771 group = "distribution"
772 description = "Create the minimal and full getdown app folder for installers and website and create digest file"
773 dependsOn getdownDigest
777 delete project.ext.getdownWebsiteDir
778 delete project.ext.getdownFilesDir
782 def install4jHomeDir = "/opt/install4j"
783 def hostname = "hostname".execute().text.trim()
784 if (hostname.equals("jv-bamboo")) {
785 install4jHomeDir = System.getProperty("user.home")+"/buildtools/install4j"
786 } else if (OperatingSystem.current().isMacOsX()) {
787 install4jHomeDir = '/Applications/install4j.app/Contents/Resources/app'
788 if (! file(install4jHomeDir).exists()) {
789 install4jHomeDir = System.getProperty("user.home")+install4jHomeDir
791 } else if (OperatingSystem.current().isLinux()) {
792 install4jHomeDir = System.getProperty("user.home")+"/buildtools/install4j"
794 installDir = file(install4jHomeDir)
795 mediaTypes = Arrays.asList(install4jMediaTypes.split(","))
803 def install4jDir = "$jalviewDir/$install4jResourceDir"
804 def install4jConfFile = "jalview-installers-java"+JAVA_VERSION+".install4j"
805 install4jConf = "$install4jDir/$install4jConfFile"
807 task copyInstall4jTemplate(type: Copy) {
808 macosJavaVMDir = System.env.HOME+"/buildtools/jre/openjdk-java_vm/getdown/macos-jre"+JAVA_VERSION+"/java_vm"
809 macosJavaVMTgz = System.env.HOME+"/buildtools/jre/openjdk-java_vm/install4j/tgz/macos-jre"+JAVA_VERSION+".tar.gz"
810 windowsJavaVMDir = System.env.HOME+"/buildtools/jre/openjdk-java_vm/getdown/windows-jre"+JAVA_VERSION+"/java_vm"
811 windowsJavaVMTgz = System.env.HOME+"/buildtools/jre/openjdk-java_vm/install4j/tgz/windows-jre"+JAVA_VERSION+".tar.gz"
812 from (install4jDir) {
813 include install4jTemplate
814 rename (install4jTemplate, install4jConfFile)
815 filter(ReplaceTokens, beginToken: '', endToken: '', tokens: ['9999999999': JAVA_VERSION])
816 filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['JAVA_VERSION': JAVA_VERSION, 'VERSION': JALVIEW_VERSION, 'MACOS_JAVA_VM_DIR': macosJavaVMDir, 'MACOS_JAVA_VM_TGZ': macosJavaVMTgz, 'WINDOWS_JAVA_VM_DIR': windowsJavaVMDir, 'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz])
819 inputs.files("$install4jDir/$install4jTemplate")
820 outputs.files(install4jConf)
823 task installers(type: com.install4j.gradle.Install4jTask) {
824 group = "distribution"
825 description = "Create the install4j installers"
827 dependsOn copyInstall4jTemplate
828 projectFile = file(install4jConf)
829 println("Using projectFile "+projectFile)
830 variables = [majorVersion: version.substring(2, 11), build: 001]
831 destination = "$jalviewDir/$install4jBuildDir/$JAVA_VERSION"
833 inputs.dir(project.ext.getdownWebsiteDir)
834 inputs.file(install4jConf)
835 inputs.dir(macosJavaVMDir)
836 inputs.dir(windowsJavaVMDir)
837 outputs.dir("$jalviewDir/$install4jBuildDir/$JAVA_VERSION")