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 JAVA_INTEGER_VERSION
68 def additional_compiler_args = []
69 // these are getdown.txt properties defined dependent on the JAVA_VERSION
70 def getdown_alt_java_min_version
71 // this property is assigned below and expanded to multiple lines in the getdown task
72 def getdown_alt_multi_java_location
73 if (JAVA_VERSION.equals("1.8")) {
74 JAVA_INTEGER_VERSION = "8"
77 compile_source_compatibility = 1.8
78 compile_target_compatibility = 1.8
79 getdown_alt_java_min_version = getdown_alt_java8_min_version
80 getdown_alt_multi_java_location = getdown_alt_java8_txt_multi_java_location
81 } else if (JAVA_VERSION.equals("11")) {
82 JAVA_INTEGER_VERSION = "11"
84 libDistDir = j11libDir
85 compile_source_compatibility = 11
86 compile_target_compatibility = 11
87 getdown_alt_java_min_version = getdown_alt_java11_min_version
88 getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
89 additional_compiler_args += [
90 '--module-path', ext.modules_compileClasspath.asPath,
91 '--add-modules', j11modules
94 throw new GradleException("JAVA_VERSION=$JAVA_VERSION not currently supported by Jalview")
101 srcDirs "$jalviewDir/$sourceDir"
102 outputDir = file("$classes")
106 srcDirs "$jalviewDir/$resourceDir"
107 srcDirs "$jalviewDir/$libDistDir"
110 jar.destinationDir = file("$jalviewDir/$packageDir")
112 compileClasspath = files(sourceSets.main.java.outputDir)
113 compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
115 runtimeClasspath = compileClasspath
119 srcDirs = [ cloverInstrDir ]
120 outputDir = file("${buildDir}/${cloverClassesDir}")
124 srcDirs = sourceSets.main.resources.srcDirs
126 compileClasspath = configurations.cloverRuntime + files( sourceSets.clover.java.outputDir )
127 compileClasspath += files(sourceSets.main.java.outputDir)
128 compileClasspath += sourceSets.main.compileClasspath
129 compileClasspath += fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"])
130 compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
132 runtimeClasspath = compileClasspath
137 srcDirs "$jalviewDir/$testSourceDir"
138 outputDir = file("$jalviewDir/$testOutputDir")
142 srcDirs = sourceSets.main.resources.srcDirs
145 compileClasspath = files( sourceSets.test.java.outputDir )
148 compileClasspath += sourceSets.clover.compileClasspath
150 compileClasspath += files(sourceSets.main.java.outputDir)
152 compileClasspath += sourceSets.main.compileClasspath
153 compileClasspath += files( sourceSets.main.resources.srcDirs)
154 compileClasspath += fileTree(dir: "$jalviewDir/$utilsDir", include: ["**/*.jar"])
155 compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"])
157 runtimeClasspath = compileClasspath
164 cloverCompile 'org.openclover:clover:4.3.1'
165 testCompile 'org.openclover:clover:4.3.1'
171 cloverRuntime.extendsFrom cloverCompile
176 name = "Jalview with gradle build"
178 natures 'org.eclipse.jdt.core.javanature',
179 'org.eclipse.jdt.groovy.core.groovyNature',
180 'org.eclipse.buildship.core.gradleprojectnature'
182 buildCommand 'org.eclipse.jdt.core.javabuilder'
183 buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
187 //defaultOutputDir = sourceSets.main.java.outputDir
189 configurations.each{ if (it.isCanBeResolved()) {
193 containers 'org.eclipse.buildship.core.gradleclasspathcontainer'
195 minusConfigurations += removeThese
196 plusConfigurations = [ ]
200 def removeTheseToo = []
201 HashMap<String, Boolean> addedSrcPath = new HashMap<>();
202 cp.entries.each { entry ->
203 if (entry.kind == 'src') {
204 if (addedSrcPath.getAt(entry.path) || !(entry.path == "src" || entry.path == "test" || entry.path == "resources")) {
205 removeTheseToo += entry
207 addedSrcPath.putAt(entry.path, true)
211 cp.entries.removeAll(removeTheseToo)
215 def node = it.asNode()
216 def srcTestAttributes
217 node.children().each{ cpe ->
218 def attributes = cpe.attributes()
219 if (attributes.get("kind") == "src" && attributes.get("path") == "test") {
220 srcTestAttributes = cpe.find { a -> a.name() == "attributes" }
224 def addTestAttribute = true
225 srcTestAttributes.each{a ->
226 if (a.name() == "attribute" && a.attributes().getAt("name") == "test") {
227 addTestAttribute = false
230 if (addTestAttribute) {
231 srcTestAttributes.append(new Node(null, "attribute", [name:"test", value:"true"]))
234 node.appendNode('classpathentry', [kind:"output", path:"bin/main"])
235 HashMap<String, Boolean> addedLibPath = new HashMap<>();
236 def allPaths = sourceSets.test.compileClasspath + sourceSets.main.compileClasspath
237 sourceSets.main.compileClasspath.each{
238 //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
239 //no longer want to add outputDir as eclipse is using its own output dir in bin/main
240 if (it.isDirectory() || ! it.exists()) {
241 // don't add dirs to classpath
242 //println("Not adding directory "+it)
245 def itPath = it.toString()
246 if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
247 itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
249 if (addedLibPath.get(itPath)) {
250 //println("Not adding duplicate entry "+itPath)
252 //println("Adding entry "+itPath)
253 node.appendNode('classpathentry', [kind:"lib", path:itPath])
254 addedLibPath.put(itPath, true)
257 sourceSets.test.compileClasspath.each{
258 //if ((it.isDirectory() || ! it.exists()) && ! (it.equals(sourceSets.main.java.outputDir))) {
259 //no longer want to add outputDir as eclipse is using its own output dir in bin/main
260 if (it.isDirectory() || ! it.exists()) {
261 // don't add dirs to classpath
262 //println("Not adding directory "+it)
265 def itPath = it.toString()
266 if (itPath.startsWith(jalviewDirAbsolutePath+"/")) {
267 itPath = itPath.substring(jalviewDirAbsolutePath.length()+1)
269 if (addedLibPath.get(itPath)) {
270 //println("Not adding duplicate entry "+itPath)
272 //println("Adding entry "+itPath)
273 node.appendNode('classpathentry', [kind:"lib", path:itPath])
274 .appendNode('attributes')
275 .appendNode('attribute', [name:"test", value:"true"])
276 addedLibPath.put(itPath, true)
285 // for the IDE, use java 11 compatibility
286 sourceCompatibility = 11
287 targetCompatibility = 11
288 javaRuntimeName = "JavaSE-11"
291 withProperties { props ->
292 def jalview_prefs = new Properties()
293 def ins = new FileInputStream(eclipse_extra_jdt_prefs_file)
294 jalview_prefs.load(ins)
296 jalview_prefs.forEach { t, v ->
297 if (props.getAt(t) == null) {
308 // only instrument source, we build test classes as normal
309 inputs.files files (sourceSets.main.allJava) // , fileTree(dir:"$jalviewDir/$testSourceDir", include: ["**/*.java"]))
310 outputs.dir cloverInstrDir
313 delete cloverInstrDir
314 def argsList = ["--initstring", "${buildDir}/clover/clover.db",
315 "-d", "${buildDir}/${cloverSourcesInstrDir}"]
316 argsList.addAll(inputs.files.files.collect({ file ->
319 String[] args = argsList.toArray()
320 println("About to instrument "+args.length +" files")
321 com.atlassian.clover.CloverInstr.mainImpl(args)
327 group = "Verification"
328 description = "Createst the Clover report"
329 inputs.dir "${buildDir}/clover"
330 outputs.dir "${reportsDir}/clover"
332 file("${buildDir}/clover/clover.db").exists()
335 def argsList = ["--initstring", "${buildDir}/clover/clover.db",
336 "-o", "${reportsDir}/clover"]
337 String[] args = argsList.toArray()
338 com.atlassian.clover.reporters.html.HtmlReporter.runReport(args)
340 // and generate ${reportsDir}/clover/clover.xml
341 args = ["--initstring", "${buildDir}/clover/clover.db",
342 "-o", "${reportsDir}/clover/clover.xml"].toArray()
343 com.atlassian.clover.reporters.xml.XMLReporter.runReport(args)
353 sourceCompatibility = compile_source_compatibility
354 targetCompatibility = compile_target_compatibility
355 options.compilerArgs = additional_compiler_args
356 print ("Setting target compatibility to "+targetCompatibility+"\n")
363 dependsOn compileCloverJava
364 classpath += configurations.cloverRuntime
366 classpath += sourceSets.main.runtimeClasspath
369 sourceCompatibility = compile_source_compatibility
370 targetCompatibility = compile_target_compatibility
371 options.compilerArgs = additional_compiler_args
372 print ("Setting target compatibility to "+targetCompatibility+"\n")
380 sourceCompatibility = compile_source_compatibility
381 targetCompatibility = compile_target_compatibility
382 options.compilerArgs += additional_compiler_args
383 print ("Setting target compatibility to "+targetCompatibility+"\n")
385 classpath += configurations.cloverRuntime
389 delete sourceSets.main.java.outputDir
393 delete sourceSets.test.java.outputDir
394 delete cloverInstrDir
397 def getDate(format) {
398 def date = new Date()
399 //return date.format("dd MMMM yyyy")
400 return date.format(format)
404 def stdout = new ByteArrayOutputStream()
406 commandLine "git", "rev-parse", "--short", "HEAD"
407 standardOutput = stdout
408 workingDir = jalviewDir
410 return stdout.toString().trim()
414 def stdout = new ByteArrayOutputStream()
416 commandLine "git", "rev-parse", "--abbrev-ref", "HEAD"
417 standardOutput = stdout
418 workingDir = jalviewDir
420 return stdout.toString().trim()
423 task createBuildProperties(type: WriteProperties) {
424 inputs.dir("$jalviewDir/$sourceDir")
425 inputs.dir("$jalviewDir/$resourceDir")
426 outputFile "$classes/$buildPropertiesFile"
427 /* taking time/date specific comment out to allow better incremental builds */
428 //comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
429 comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd")
430 property "BUILD_DATE", getDate("dd MMMM yyyy")
431 property "VERSION", JALVIEW_VERSION
432 property "INSTALLATION", INSTALLATION+" git-commit:"+getGitHash()+" ["+getGitBranch()+"]"
433 outputs.file(outputFile)
434 outputs.dir("$classes")
437 task syncDocs(type: Sync) {
438 def syncDir = "$classes/$docDir"
439 from fileTree("$jalviewDir/$docDir")
444 def helpFile = "$classes/$helpDir/help.jhm"
445 task syncHelp(type: Sync) {
446 inputs.files("$jalviewDir/$helpDir")
447 outputs.files(helpFile)
449 def syncDir = "$classes/$helpDir"
450 from fileTree("$jalviewDir/$helpDir")
454 task copyHelp(type: Copy) {
455 def inputDir = "$jalviewDir/$helpDir"
456 def outputDir = "$classes/$helpDir"
459 filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['Version-Rel': "USING_FILTER"])
461 outputs.files(helpFile)
462 outputs.dir(outputDir)
465 task syncLib(type: Sync) {
466 def syncDir = "$classes/$libDistDir"
467 from fileTree("$jalviewDir/$libDistDir")
471 task syncResources(type: Sync) {
472 from "$jalviewDir/$resourceDir"
482 dependsOn syncResources
488 //testReportDirName = "test-reports" // note that test workingDir will be $jalviewDir
491 dependsOn compileJava
493 dependsOn cloverInstr
496 print("Running tests " + (use_clover?"WITH":"WITHOUT") + " clover [clover="+use_clover+"]\n")
499 includeGroups testngGroups
501 useDefaultListeners=true
504 workingDir = jalviewDir
505 //systemProperties 'clover.jar' System.properties.clover.jar
506 sourceCompatibility = compile_source_compatibility
507 targetCompatibility = compile_target_compatibility
508 jvmArgs += additional_compiler_args
509 print ("Setting target compatibility to "+targetCompatibility+"\n")
512 task buildIndices(type: JavaExec) {
514 classpath = sourceSets.main.compileClasspath
515 main = "com.sun.java.help.search.Indexer"
516 workingDir = "$classes/$helpDir"
519 inputs.dir("$workingDir/$argDir")
521 outputs.dir("$classes/doc")
522 outputs.dir("$classes/help")
523 outputs.file("$workingDir/JavaHelpSearch/DOCS")
524 outputs.file("$workingDir/JavaHelpSearch/DOCS.TAB")
525 outputs.file("$workingDir/JavaHelpSearch/OFFSETS")
526 outputs.file("$workingDir/JavaHelpSearch/POSITIONS")
527 outputs.file("$workingDir/JavaHelpSearch/SCHEMA")
528 outputs.file("$workingDir/JavaHelpSearch/TMAP")
531 task compileLinkCheck(type: JavaCompile) {
533 classpath = files("$jalviewDir/$utilsDir")
534 destinationDir = file("$jalviewDir/$utilsDir")
535 source = fileTree(dir: "$jalviewDir/$utilsDir", include: ["HelpLinksChecker.java", "BufferedLineReader.java"])
537 outputs.file("$jalviewDir/$utilsDir/HelpLinksChecker.class")
538 outputs.file("$jalviewDir/$utilsDir/BufferedLineReader.class")
541 def helplinkscheckeroutputfile = file("$jalviewDir/$utilsDir/HelpLinksChecker.out")
542 task linkCheck(type: JavaExec) {
543 dependsOn prepare, compileLinkCheck
544 classpath = files("$jalviewDir/$utilsDir")
545 main = "HelpLinksChecker"
546 workingDir = jalviewDir
547 def help = "$classes/$helpDir"
548 args = [ "$classes/$helpDir", "-nointernet" ]
549 //args = [ "$classesDir/$helpDir", "-nointernet" ]
552 helplinkscheckeroutputfile.createNewFile()
553 standardOutput new FileOutputStream(helplinkscheckeroutputfile, false)
556 outputs.file(helplinkscheckeroutputfile)
559 task cleanPackageDir(type: Delete) {
560 delete fileTree("$jalviewDir/$packageDir").include("*.jar")
565 dependsOn buildIndices
566 dependsOn createBuildProperties
569 attributes "Main-Class": mainClass,
570 "Permissions": "all-permissions",
571 "Application-Name": "Jalview Desktop",
572 "Codebase": application_codebase
575 destinationDir = file("$jalviewDir/$packageDir")
576 archiveName = rootProject.name+".jar"
584 inputs.dir("$classes")
585 outputs.file("$jalviewDir/$packageDir/$archiveName")
588 task copyJars(type: Copy) {
589 from fileTree("$classes").include("**/*.jar").include("*.jar").files
590 into "$jalviewDir/$packageDir"
593 // doing a Sync instead of Copy as Copy doesn't deal with "outputs" very well
594 task syncJars(type: Sync) {
595 from fileTree("$jalviewDir/$libDistDir").include("**/*.jar").include("*.jar").files
596 into "$jalviewDir/$packageDir"
598 include jar.archiveName
604 description = "Put all required libraries in dist"
605 // order of "cleanPackageDir", "copyJars", "jar" important!
606 jar.mustRunAfter cleanPackageDir
607 syncJars.mustRunAfter cleanPackageDir
608 dependsOn cleanPackageDir
611 outputs.dir("$jalviewDir/$packageDir")
615 dependsOn cleanPackageDir
622 from ("$jalviewDir/$libDistDir") {
625 mainClassName = shadowJarMainClass
627 classifier = "all-"+JAVA_VERSION
631 task getdownWebsite() {
632 group = "distribution"
633 description = "Create the getdown minimal app folder, and website folder for this version of jalview. Website folder also used for offline app installer"
635 def getdownWebsiteResourceFilenames = []
636 def getdownTextString = ""
637 def getdownResourceDir = project.ext.getdownResourceDir
638 def getdownAppDir = project.ext.getdownAppDir
639 def getdownResourceFilenames = []
641 // go through properties looking for getdown_txt_...
642 def props = project.properties.sort { it.key }
643 props.put("getdown_txt_java_min_version", getdown_alt_java_min_version)
644 props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
646 props.put("getdown_txt_appbase", getdown_app_base)
647 props.each{ prop, val ->
648 if (prop.startsWith("getdown_txt_") && val != null) {
649 if (prop.startsWith("getdown_txt_multi_")) {
650 def key = prop.substring(18)
651 val.split(",").each{ v ->
652 def line = key + " = " + v + "\n"
653 getdownTextString += line
656 // file values rationalised
657 if (val.indexOf('/') > -1) {
659 if (val.indexOf('/') == 0) {
662 } else if (val.indexOf('/') > 0) {
663 // relative path (relative to jalviewDir)
664 r = file( jalviewDir + '/' + val )
667 val = getdown_resource_dir + '/' + r.getName()
668 getdownWebsiteResourceFilenames += val
669 getdownResourceFilenames += r.getPath()
672 def line = prop.substring(12) + " = " + val + "\n"
673 getdownTextString += line
678 getdownWebsiteResourceFilenames.each{ filename ->
679 getdownTextString += "resource = "+filename+"\n"
681 getdownResourceFilenames.each{ filename ->
684 into project.ext.getdownResourceDir
689 makeDist.outputs.files.each{ f ->
690 if (f.isDirectory()) {
691 def files = fileTree(dir: f, include: ["*"]).getFiles()
693 } else if (f.exists()) {
697 codeFiles.sort().each{f ->
698 def line = "code = " + getdown_app_dir + '/' + f.getName() + "\n"
699 getdownTextString += line
702 into project.ext.getdownAppDir
706 // NOT USING MODULES YET, EVERYTHING SHOULD BE IN dist
708 if (JAVA_VERSION.equals("11")) {
709 def j11libFiles = fileTree(dir: "$jalviewDir/$j11libDir", include: ["*.jar"]).getFiles()
710 j11libFiles.sort().each{f ->
711 def line = "code = " + getdown_j11lib_dir + '/' + f.getName() + "\n"
712 getdownTextString += line
715 into project.ext.getdownJ11libDir
721 getdownTextString += "code = " + file(getdownLauncher).getName() + "\n"
722 getdownTextString += "class = " + mainClass + "\n"
724 def getdown_txt = file(project.ext.getdownWebsiteDir + "/getdown.txt")
725 getdown_txt.write(getdownTextString)
729 into project.ext.getdownFilesDir
734 into project.ext.getdownFilesDir
739 into project.ext.getdownWebsiteDir
744 into project.ext.getdownFilesDir + '/' + packageDir
748 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.background_image')
749 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.error_background')
750 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.progress_image')
751 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.icon')
752 from jalviewDir + '/' + project.getProperty('getdown_txt_ui.mac_dock_icon')
753 into project.ext.getdownFilesDir + '/' + getdown_resource_dir
757 inputs.dir(jalviewDir + '/' + packageDir)
758 outputs.dir(project.ext.getdownWebsiteDir)
759 outputs.dir(project.ext.getdownFilesDir)
762 task getdownDigest(type: JavaExec) {
763 group = "distribution"
764 description = "Digest the getdown website folder"
765 dependsOn getdownWebsite
766 classpath = files(jalviewDir + '/' + getdown_core)
767 classpath file(jalviewDir + '/' + getdown_lib1)
768 main = "com.threerings.getdown.tools.Digester"
769 args project.ext.getdownWebsiteDir
770 outputs.file(project.ext.getdownWebsiteDir + '/' + "digest2.txt")
774 group = "distribution"
775 description = "Create the minimal and full getdown app folder for installers and website and create digest file"
776 dependsOn getdownDigest
780 delete project.ext.getdownWebsiteDir
781 delete project.ext.getdownFilesDir
785 def install4jHomeDir = "/opt/install4j"
786 def hostname = "hostname".execute().text.trim()
787 if (hostname.equals("jv-bamboo")) {
788 install4jHomeDir = System.getProperty("user.home")+"/buildtools/install4j"
789 } else if (OperatingSystem.current().isMacOsX()) {
790 install4jHomeDir = '/Applications/install4j.app/Contents/Resources/app'
791 if (! file(install4jHomeDir).exists()) {
792 install4jHomeDir = System.getProperty("user.home")+install4jHomeDir
794 } else if (OperatingSystem.current().isLinux()) {
795 install4jHomeDir = System.getProperty("user.home")+"/buildtools/install4j"
797 installDir = file(install4jHomeDir)
798 mediaTypes = Arrays.asList(install4jMediaTypes.split(","))
806 def install4jDir = "$jalviewDir/$install4jResourceDir"
807 def install4jConfFile = "jalview-installers-java"+JAVA_VERSION+".install4j"
808 install4jConf = "$install4jDir/$install4jConfFile"
810 task copyInstall4jTemplate(type: Copy) {
811 macosJavaVMDir = System.env.HOME+"/buildtools/jre/openjdk-java_vm/getdown/macos-jre"+JAVA_VERSION+"/jre"
812 macosJavaVMTgz = System.env.HOME+"/buildtools/jre/openjdk-java_vm/install4j/tgz/macos-jre"+JAVA_VERSION+".tar.gz"
813 windowsJavaVMDir = System.env.HOME+"/buildtools/jre/openjdk-java_vm/getdown/windows-jre"+JAVA_VERSION+"/jre"
814 windowsJavaVMTgz = System.env.HOME+"/buildtools/jre/openjdk-java_vm/install4j/tgz/windows-jre"+JAVA_VERSION+".tar.gz"
815 from (install4jDir) {
816 include install4jTemplate
817 rename (install4jTemplate, install4jConfFile)
818 filter(ReplaceTokens, beginToken: '', endToken: '', tokens: ['9999999999': JAVA_VERSION])
819 filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['JAVA_VERSION': JAVA_VERSION, 'JAVA_INTEGER_VERSION': JAVA_INTEGER_VERSION, 'VERSION': JALVIEW_VERSION, 'MACOS_JAVA_VM_DIR': macosJavaVMDir, 'MACOS_JAVA_VM_TGZ': macosJavaVMTgz, 'WINDOWS_JAVA_VM_DIR': windowsJavaVMDir, 'WINDOWS_JAVA_VM_TGZ': windowsJavaVMTgz])
822 inputs.files("$install4jDir/$install4jTemplate")
823 outputs.files(install4jConf)
826 task installers(type: com.install4j.gradle.Install4jTask) {
827 group = "distribution"
828 description = "Create the install4j installers"
830 dependsOn copyInstall4jTemplate
831 projectFile = file(install4jConf)
832 println("Using projectFile "+projectFile)
833 variables = [majorVersion: version.substring(2, 11), build: 001]
834 destination = "$jalviewDir/$install4jBuildDir/$JAVA_VERSION"
836 inputs.dir(project.ext.getdownWebsiteDir)
837 inputs.file(install4jConf)
838 inputs.dir(macosJavaVMDir)
839 inputs.dir(windowsJavaVMDir)
840 outputs.dir("$jalviewDir/$install4jBuildDir/$JAVA_VERSION")