Loading .gitignore +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ .idea/workspace.xml test/data/out/ /build /build_java9 /build_java11 /bin igv.log /.gradle Loading .travis.yml +3 −3 Original line number Diff line number Diff line Loading @@ -6,10 +6,10 @@ cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ jdk: openjdk10 jdk: openjdk11 install: - ./gradlew -b build_java9.gradle assemble - ./gradlew -b build_java11.gradle assemble script: - ./gradlew -b build_java9.gradle check - ./gradlew -b build_java11.gradle check - jdk_switcher use openjdk8 - ./gradlew compileJava No newline at end of file README.md +12 −13 Original line number Diff line number Diff line # igv [](https://travis-ci.org/igvteam/igv) Integrative Genomics Viewer - dekstop genome visualization tool for Mac, Windows, and Linux. Integrative Genomics Viewer - desktop genome visualization tool for Mac, Windows, and Linux. ### Building Loading @@ -14,8 +14,8 @@ You may need to execute 'gradle wrapper' to set up the gradle wrapper. This sho first time only, or if you clean up the local .gradle directory. Only do this if the './gradlew' calls fail. There are two different build options, one for Java 8 and another for Java 9 and up. The default is to build for Java 8. Java 8 builds are *NOT* compatible with Java 9 and vice versa. There are two different build options, one for Java 8 and another for Java 11. The default is to build for Java 8. Java 8 builds are *NOT* compatible with Java 11 and vice versa. There are other options but these cover the most common uses: Loading @@ -35,7 +35,7 @@ NOTE: If on a Windows platform use ```./gradlew.bat'``` in the instructions belo * All four JARs must be in the same location in order to run IGV. It can be run directly from 'build/IGV-dist' * Launch with 'igv.sh' on UNIX, 'igv.command' on Mac, and 'igv.bat' on Windows. These scripts can * Launch with 'igv.sh' on UNIX, 'igv.command' on Mac, and 'igv.bat' (or 'igv_32.bat' for 32-bit Java) on Windows. These scripts can be edited to adjust JVM flags like maximum memory, etc. * All other runtime dependencies are bundled into igv.jar. There is also an igv-minimal.jar in Loading @@ -54,17 +54,16 @@ NOTE: If on a Windows platform use ```./gradlew.bat'``` in the instructions belo Note that Gradle creates a number of other subdirectories in 'build'. These can be safely ignored. #### Java 9 #### Java 11 The instructions for Java 9 are nearly identical other than the need to specify the Java 9 build file and that the results will be found in 'build_java9' rather than 'build'. More specifically: The instructions for Java 11 are nearly identical other than the need to specify the Java 11 build file and that the results will be found in 'build_java11' rather than 'build'. More specifically: * Use './gradlew -b build_java9.gradle createDist' to build a distribution directory with helper scripts * Use ```./gradlew -b build_java11.gradle createDist``` to build a distribution directory with helper scripts for launching. The structure is slightly different but the concept is the same. * Use './gradlew -b build_java9.gradle createToolsDist' for the igvtools distribution. * Use ```./gradlew -b build_java11.gradle test``` to run the test suite. * Use './gradlew -b build_java9.gradle test' to run the test suite. The full JAR build option is *NOT* available for Java 9+ because of modularity requirements. The full JAR build option is *NOT* available for Java 11 because of modularity requirements. Also, there is no separate igvtools distribution on Java 11; at present, this is folded into the normal IGV client distribution. build.gradle +3 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ dependencies { } task wrapper(type: Wrapper) { gradleVersion = '4.4.1' gradleVersion = '4.10.1' } sourceCompatibility = 1.8 Loading Loading @@ -185,6 +185,7 @@ tasks.withType(Test) { task createDist(type: Copy, dependsOn: fullJar) { from ("scripts") { include 'igv.bat' include 'igv_32.bat' include 'igv.command' include 'igv.sh' include 'readme.txt' Loading Loading @@ -306,7 +307,7 @@ task createToolsDistZip(type: Zip, dependsOn: createToolsDist) { baseName = "IGVTools" from "${buildDir}/IGVTools-dist" into createToolsDistZip.baseName into createToolsDistZip.baseName + "_${version}" doLast { project.exec { commandLine('chmod', '775', createToolsDistZip.archivePath ) } Loading build_java9.gradle→build_java11.gradle +138 −101 Original line number Diff line number Diff line Loading @@ -26,14 +26,14 @@ import org.apache.tools.ant.filters.ReplaceTokens ext.moduleName = 'org.igv' ext.mainClassName = 'org.broad.igv.ui.Main' // Put the Java 9 build into a special dir to avoid accidental collisions. // Despite this, it is recommended that Java 8 vs. 9 builds be run in different locations. buildDir = 'build_java9' // Put the Java 11 build into a special dir to avoid accidental collisions. // Despite this, it is recommended that Java 8 vs. 11 builds be run in different locations. buildDir = 'build_java11' sourceSets { main { java { srcDirs = ['src/main/java', 'src/main/java9'] srcDirs = ['src/main/java', 'src/main/java11'] } resources { srcDirs = ['src/main/resources', 'src/main/resources-jlfgr-1_0'] Loading @@ -41,19 +41,23 @@ sourceSets { } } } configurations { jarsForClasspath } dependencies { // Use the newer JIDE lib for Java 9 builds compile fileTree(dir: 'lib', include: '*.jar', exclude: 'jide-oss-3.5.5.jar') + fileTree(dir: 'lib_java9', include: '*.jar') compile fileTree(dir: 'lib', include: '*.jar') testCompile fileTree(dir: 'test/lib', include: '*.jar') } task wrapper(type: Wrapper) { gradleVersion = '4.4.1' gradleVersion = '4.10.2' } sourceCompatibility = 1.9 targetCompatibility = 1.9 // Gradle bug prevents us from generating Java 11 bytecode: https://github.com/gradle/gradle/issues/5120 // Workaround is to target Java 10 for now. sourceCompatibility = 10 targetCompatibility = 10 processResources { // Set the current timestamp for release builds; pass in a blank property to enable (i.e. -Ptimestamp="" at CLI) Loading @@ -78,20 +82,6 @@ jar { } } task tooljar(type: Jar, dependsOn: jar) { // This jar is the same as the client jar above, just a different jar name and manifest archiveName = 'igvtools.jar' from(sourceSets.main.output) { } manifest { attributes( "Implementation-Title": "IGVTools", "Built-By": System.getProperty('user.name'), "Main-Class": "org.broad.igv.tools.IgvTools", ) } } compileJava { inputs.property("moduleName", moduleName) doFirst { Loading Loading @@ -129,14 +119,14 @@ test { inputs.property("moduleName", moduleName) doFirst { jvmArgs = [ '-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize', '--module-path', classpath.asPath, '--add-modules', 'junit', '--add-modules', 'fest.swing', '--add-modules', 'java.xml.bind', '--add-modules', 'ALL-MODULE-PATH', '--add-reads', "$moduleName=junit", '--add-reads', "$moduleName=fest.swing", '@scripts/java9/test_suite.args', '@scripts/java11/test_suite.args', '--patch-module', "$moduleName=" + files(sourceSets.test.java.outputDir, sourceSets.main.output.resourcesDir).asPath, ] classpath = files() Loading @@ -144,130 +134,177 @@ test { } task createDist(type: Copy, dependsOn: jar) { from ('scripts/java9') { include 'igv.bat' from ("web/IGV_64.png") from ('scripts/java11') { include '*.bat' include '*.sh' include 'igv.command' include 'igv.sh' include 'igv_hidpi.*' include 'igv.args' include 'readme.txt' include 'igvtools*' } with copySpec { from ("lib") { include '*.jar' exclude 'jide-oss-3.5.5.jar' } from ("lib_java9") { include '*.jar' } from ("${buildDir}/libs") { include 'igv.jar' } from ("${buildDir}/libs") from ("lib") { include '*.jar' } into "lib" } with copySpec { from ("genomes/sizes") { } into "lib/genomes" } into "${buildDir}/IGV-dist" } task createDistZip(type: Zip, dependsOn: createDist) { archiveName = "IGV_${version}_java10.zip" archiveName = "IGV_${version}.zip" destinationDir = file("${buildDir}/distZip") baseName = "IGV" from "${buildDir}/IGV-dist" exclude "*.bat" into createDistZip.baseName + "_${version}_java10" from ("${buildDir}/IGV-dist") into createDistZip.baseName + "_${version}" doLast { project.exec { commandLine('chmod', '775', createDistZip.archivePath ) } } } task createMacDist(type: Copy, dependsOn: createDist) { task createLinuxDistZip(type: Zip, dependsOn: createDist) { baseName = "IGV_Linux" archiveName = createLinuxDistZip.baseName + "_${version}.zip" destinationDir = file("${buildDir}/distZip") if (!jdkBundleLinux.equals("")) { with copySpec { from jdkBundleLinux into "jdk-11" } } from ("${buildDir}/IGV-dist") { exclude "*.bat" exclude "*.command" exclude 'igvtools*' exclude 'lib/genomes' } into createLinuxDistZip.baseName + "_${version}" doLast { project.exec { commandLine('chmod', '775', createLinuxDistZip.archivePath) } } } task createMacDistZip(type: Zip, dependsOn: createDist) { baseName = "IGV_Mac" archiveName = createMacDistZip.baseName + "_${version}.zip" destinationDir = file("${buildDir}/distZip") if (!jdkBundleMac.equals("")) { with copySpec { from jdkBundleMac into "jdk-11" } } from ("${buildDir}/IGV-dist") { exclude "*.bat" exclude "*_hidpi*" exclude "igvtools*" exclude 'lib/genomes' } into createMacDistZip.baseName + "_${version}" doLast { project.exec { commandLine('chmod', '775', createMacDistZip.archivePath ) } } } task createMacAppDist(type: Copy, dependsOn: createDist) { if (!jdkBundleMac.equals("")) { with copySpec { from jdkBundleMac into "IGV_${version}.app/Contents/jdk-11" } } with copySpec { from ("scripts/mac.app") exclude "Contents/Info.plist.template" into "IGV_${version}_java10.app" from ("scripts/mac.app") { exclude "Contents/Info.plist.template" exclude "Contents/MacOS/JavaAppLauncher" } into "IGV_${version}.app" } with copySpec { from ("scripts/java9/Info.plist.template") from ("scripts/java11/Info.plist.template") filter (ReplaceTokens, tokens: [ VERSION: version ]) rename "Info.plist.template", "Info.plist" into "IGV_${version}_java10.app/Contents" into "IGV_${version}.app/Contents" } with copySpec { from ("scripts/java11/IGV_mac.app.command") rename "IGV_mac.app.command", "IGV" into "IGV_${version}.app/Contents/MacOS" } with copySpec { from ("web/IGV_64.png") into "IGV_${version}.app/Contents/Resources" } with copySpec { from ("${buildDir}/IGV-dist/") include 'igv.args' into "IGV_${version}.app/Contents/Java/" } with copySpec { from ("${buildDir}/IGV-dist/lib") include '*.jar' into "IGV_${version}_java10.app/Contents/Java" into "IGV_${version}.app/Contents/Java/lib" } into "${buildDir}/IGV-Mac-dist" into "${buildDir}/IGV-MacApp-dist" doLast { project.exec { commandLine('chmod', '775', "${buildDir}/IGV-Mac-dist/IGV_${version}_java10.app" ) } project.exec { commandLine('chmod', '775', "${buildDir}/IGV-MacApp-dist/IGV_${version}.app" ) } } } task createMacDistZip(type: Zip, dependsOn: createMacDist) { archiveName = "IGV_${version}_java10.app.zip" task createMacAppDistZip(type: Zip, dependsOn: createMacAppDist) { archiveName = "IGV_${version}.app.zip" destinationDir = file("${buildDir}/distZip") from "${buildDir}/IGV-Mac-dist" from "${buildDir}/IGV-MacApp-dist" doLast { project.exec { commandLine('chmod', '775', createMacDistZip.archivePath ) } project.exec { commandLine('chmod', '775', createMacAppDistZip.archivePath ) } } } task createWinDistZip(type: Zip, dependsOn: createDist) { archiveName = "IGV_Win_${version}_java10.zip" destinationDir = file("${buildDir}/distZip") baseName = "IGV_Win" task createWinDist(type: Copy, dependsOn: createDist) { if (!jdkBundleWindows.equals("")) { with copySpec { from jdkBundleWindows into "IGV_${version}/jdk-11" } } with copySpec { from("${buildDir}/IGV-dist") { exclude "*.sh" exclude "igv.command" } into createWinDistZip.baseName + "_${version}_java10" doLast { project.exec { commandLine('chmod', '775', createWinDistZip.archivePath ) } } exclude "*.command" exclude "igvtools*" exclude "igvtools_gui" exclude "igvtools_gui_hidpi" exclude 'lib/genomes' } task createToolsDist(type: Copy, dependsOn: tooljar) { from ("scripts/java9") { include 'igvtools*' include 'igvtools*.bat' include 'igvtools*.command' include 'igv.args' from ("resources") { include "IGV_64.ico" } into "IGV_${version}" } with copySpec { from ("${buildDir}/libs") { include 'igvtools.jar' // Create a build-specific NSIS installer script. from ("scripts/nsis/installer.nsi") filter (ReplaceTokens, tokens: [ VERSION: version ]) } from ("lib") { include '*.jar' exclude 'jide-oss-3.5.5.jar' from ("scripts/nsis") { include "license_win.txt" } into "${buildDir}/IGV-WinExe-dist" } from ("lib_java9") { include '*.jar' task createWinExeDist(type: Exec, dependsOn: createWinDist) { commandLine(makensisCommand, "-O${buildDir}/tmp/nsis-build.log", "${buildDir}/IGV-WinExe-dist/installer.nsi") doLast { if (makensisCommand.equals("")) { throw new GradleException("Required property not set: makensisCommand"); } into "lib" } with copySpec { from ("genomes/sizes") { } into "lib/genomes" } into "${buildDir}/IGVTools-dist" } task createToolsDistZip(type: Zip, dependsOn: createToolsDist) { archiveName = "igvtools_${version}_java10.zip" destinationDir = file("${buildDir}/distZip") baseName = "IGVTools_java10" from "${buildDir}/IGVTools-dist" into createToolsDistZip.baseName task signWinExeDist(type: Exec, dependsOn: createWinExeDist) { standardInput = new ByteArrayInputStream( keyPassword.getBytes() ); commandLine(signcodeCommand, "-spc", spcFile, "-v", pvkFile, "-a", "sha1", "-\$", "commercial", "-n", "IGV ${version}", "-i", "http://www.igv.org/", "-t", tsaurl, "-tr", "10", "${buildDir}/IGV-WinExe-dist/IGV_Win_${version}-installer.exe") doLast { project.exec { commandLine('chmod', '775', createToolsDistZip.archivePath ) } if (signcodeCommand.equals("")) { throw new GradleException("Required property not set: signcodeCommand"); } } } build.dependsOn createDistZip,createMacDistZip,createWinDistZip,createToolsDistZip build.dependsOn createDistZip,createLinuxDistZip,createMacDistZip,createMacAppDistZip if (!makensisCommand.equals("") && !signcodeCommand.equals("")) { build.dependsOn signWinExeDist } No newline at end of file Loading
.gitignore +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ .idea/workspace.xml test/data/out/ /build /build_java9 /build_java11 /bin igv.log /.gradle Loading
.travis.yml +3 −3 Original line number Diff line number Diff line Loading @@ -6,10 +6,10 @@ cache: directories: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ jdk: openjdk10 jdk: openjdk11 install: - ./gradlew -b build_java9.gradle assemble - ./gradlew -b build_java11.gradle assemble script: - ./gradlew -b build_java9.gradle check - ./gradlew -b build_java11.gradle check - jdk_switcher use openjdk8 - ./gradlew compileJava No newline at end of file
README.md +12 −13 Original line number Diff line number Diff line # igv [](https://travis-ci.org/igvteam/igv) Integrative Genomics Viewer - dekstop genome visualization tool for Mac, Windows, and Linux. Integrative Genomics Viewer - desktop genome visualization tool for Mac, Windows, and Linux. ### Building Loading @@ -14,8 +14,8 @@ You may need to execute 'gradle wrapper' to set up the gradle wrapper. This sho first time only, or if you clean up the local .gradle directory. Only do this if the './gradlew' calls fail. There are two different build options, one for Java 8 and another for Java 9 and up. The default is to build for Java 8. Java 8 builds are *NOT* compatible with Java 9 and vice versa. There are two different build options, one for Java 8 and another for Java 11. The default is to build for Java 8. Java 8 builds are *NOT* compatible with Java 11 and vice versa. There are other options but these cover the most common uses: Loading @@ -35,7 +35,7 @@ NOTE: If on a Windows platform use ```./gradlew.bat'``` in the instructions belo * All four JARs must be in the same location in order to run IGV. It can be run directly from 'build/IGV-dist' * Launch with 'igv.sh' on UNIX, 'igv.command' on Mac, and 'igv.bat' on Windows. These scripts can * Launch with 'igv.sh' on UNIX, 'igv.command' on Mac, and 'igv.bat' (or 'igv_32.bat' for 32-bit Java) on Windows. These scripts can be edited to adjust JVM flags like maximum memory, etc. * All other runtime dependencies are bundled into igv.jar. There is also an igv-minimal.jar in Loading @@ -54,17 +54,16 @@ NOTE: If on a Windows platform use ```./gradlew.bat'``` in the instructions belo Note that Gradle creates a number of other subdirectories in 'build'. These can be safely ignored. #### Java 9 #### Java 11 The instructions for Java 9 are nearly identical other than the need to specify the Java 9 build file and that the results will be found in 'build_java9' rather than 'build'. More specifically: The instructions for Java 11 are nearly identical other than the need to specify the Java 11 build file and that the results will be found in 'build_java11' rather than 'build'. More specifically: * Use './gradlew -b build_java9.gradle createDist' to build a distribution directory with helper scripts * Use ```./gradlew -b build_java11.gradle createDist``` to build a distribution directory with helper scripts for launching. The structure is slightly different but the concept is the same. * Use './gradlew -b build_java9.gradle createToolsDist' for the igvtools distribution. * Use ```./gradlew -b build_java11.gradle test``` to run the test suite. * Use './gradlew -b build_java9.gradle test' to run the test suite. The full JAR build option is *NOT* available for Java 9+ because of modularity requirements. The full JAR build option is *NOT* available for Java 11 because of modularity requirements. Also, there is no separate igvtools distribution on Java 11; at present, this is folded into the normal IGV client distribution.
build.gradle +3 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ dependencies { } task wrapper(type: Wrapper) { gradleVersion = '4.4.1' gradleVersion = '4.10.1' } sourceCompatibility = 1.8 Loading Loading @@ -185,6 +185,7 @@ tasks.withType(Test) { task createDist(type: Copy, dependsOn: fullJar) { from ("scripts") { include 'igv.bat' include 'igv_32.bat' include 'igv.command' include 'igv.sh' include 'readme.txt' Loading Loading @@ -306,7 +307,7 @@ task createToolsDistZip(type: Zip, dependsOn: createToolsDist) { baseName = "IGVTools" from "${buildDir}/IGVTools-dist" into createToolsDistZip.baseName into createToolsDistZip.baseName + "_${version}" doLast { project.exec { commandLine('chmod', '775', createToolsDistZip.archivePath ) } Loading
build_java9.gradle→build_java11.gradle +138 −101 Original line number Diff line number Diff line Loading @@ -26,14 +26,14 @@ import org.apache.tools.ant.filters.ReplaceTokens ext.moduleName = 'org.igv' ext.mainClassName = 'org.broad.igv.ui.Main' // Put the Java 9 build into a special dir to avoid accidental collisions. // Despite this, it is recommended that Java 8 vs. 9 builds be run in different locations. buildDir = 'build_java9' // Put the Java 11 build into a special dir to avoid accidental collisions. // Despite this, it is recommended that Java 8 vs. 11 builds be run in different locations. buildDir = 'build_java11' sourceSets { main { java { srcDirs = ['src/main/java', 'src/main/java9'] srcDirs = ['src/main/java', 'src/main/java11'] } resources { srcDirs = ['src/main/resources', 'src/main/resources-jlfgr-1_0'] Loading @@ -41,19 +41,23 @@ sourceSets { } } } configurations { jarsForClasspath } dependencies { // Use the newer JIDE lib for Java 9 builds compile fileTree(dir: 'lib', include: '*.jar', exclude: 'jide-oss-3.5.5.jar') + fileTree(dir: 'lib_java9', include: '*.jar') compile fileTree(dir: 'lib', include: '*.jar') testCompile fileTree(dir: 'test/lib', include: '*.jar') } task wrapper(type: Wrapper) { gradleVersion = '4.4.1' gradleVersion = '4.10.2' } sourceCompatibility = 1.9 targetCompatibility = 1.9 // Gradle bug prevents us from generating Java 11 bytecode: https://github.com/gradle/gradle/issues/5120 // Workaround is to target Java 10 for now. sourceCompatibility = 10 targetCompatibility = 10 processResources { // Set the current timestamp for release builds; pass in a blank property to enable (i.e. -Ptimestamp="" at CLI) Loading @@ -78,20 +82,6 @@ jar { } } task tooljar(type: Jar, dependsOn: jar) { // This jar is the same as the client jar above, just a different jar name and manifest archiveName = 'igvtools.jar' from(sourceSets.main.output) { } manifest { attributes( "Implementation-Title": "IGVTools", "Built-By": System.getProperty('user.name'), "Main-Class": "org.broad.igv.tools.IgvTools", ) } } compileJava { inputs.property("moduleName", moduleName) doFirst { Loading Loading @@ -129,14 +119,14 @@ test { inputs.property("moduleName", moduleName) doFirst { jvmArgs = [ '-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize', '--module-path', classpath.asPath, '--add-modules', 'junit', '--add-modules', 'fest.swing', '--add-modules', 'java.xml.bind', '--add-modules', 'ALL-MODULE-PATH', '--add-reads', "$moduleName=junit", '--add-reads', "$moduleName=fest.swing", '@scripts/java9/test_suite.args', '@scripts/java11/test_suite.args', '--patch-module', "$moduleName=" + files(sourceSets.test.java.outputDir, sourceSets.main.output.resourcesDir).asPath, ] classpath = files() Loading @@ -144,130 +134,177 @@ test { } task createDist(type: Copy, dependsOn: jar) { from ('scripts/java9') { include 'igv.bat' from ("web/IGV_64.png") from ('scripts/java11') { include '*.bat' include '*.sh' include 'igv.command' include 'igv.sh' include 'igv_hidpi.*' include 'igv.args' include 'readme.txt' include 'igvtools*' } with copySpec { from ("lib") { include '*.jar' exclude 'jide-oss-3.5.5.jar' } from ("lib_java9") { include '*.jar' } from ("${buildDir}/libs") { include 'igv.jar' } from ("${buildDir}/libs") from ("lib") { include '*.jar' } into "lib" } with copySpec { from ("genomes/sizes") { } into "lib/genomes" } into "${buildDir}/IGV-dist" } task createDistZip(type: Zip, dependsOn: createDist) { archiveName = "IGV_${version}_java10.zip" archiveName = "IGV_${version}.zip" destinationDir = file("${buildDir}/distZip") baseName = "IGV" from "${buildDir}/IGV-dist" exclude "*.bat" into createDistZip.baseName + "_${version}_java10" from ("${buildDir}/IGV-dist") into createDistZip.baseName + "_${version}" doLast { project.exec { commandLine('chmod', '775', createDistZip.archivePath ) } } } task createMacDist(type: Copy, dependsOn: createDist) { task createLinuxDistZip(type: Zip, dependsOn: createDist) { baseName = "IGV_Linux" archiveName = createLinuxDistZip.baseName + "_${version}.zip" destinationDir = file("${buildDir}/distZip") if (!jdkBundleLinux.equals("")) { with copySpec { from jdkBundleLinux into "jdk-11" } } from ("${buildDir}/IGV-dist") { exclude "*.bat" exclude "*.command" exclude 'igvtools*' exclude 'lib/genomes' } into createLinuxDistZip.baseName + "_${version}" doLast { project.exec { commandLine('chmod', '775', createLinuxDistZip.archivePath) } } } task createMacDistZip(type: Zip, dependsOn: createDist) { baseName = "IGV_Mac" archiveName = createMacDistZip.baseName + "_${version}.zip" destinationDir = file("${buildDir}/distZip") if (!jdkBundleMac.equals("")) { with copySpec { from jdkBundleMac into "jdk-11" } } from ("${buildDir}/IGV-dist") { exclude "*.bat" exclude "*_hidpi*" exclude "igvtools*" exclude 'lib/genomes' } into createMacDistZip.baseName + "_${version}" doLast { project.exec { commandLine('chmod', '775', createMacDistZip.archivePath ) } } } task createMacAppDist(type: Copy, dependsOn: createDist) { if (!jdkBundleMac.equals("")) { with copySpec { from jdkBundleMac into "IGV_${version}.app/Contents/jdk-11" } } with copySpec { from ("scripts/mac.app") exclude "Contents/Info.plist.template" into "IGV_${version}_java10.app" from ("scripts/mac.app") { exclude "Contents/Info.plist.template" exclude "Contents/MacOS/JavaAppLauncher" } into "IGV_${version}.app" } with copySpec { from ("scripts/java9/Info.plist.template") from ("scripts/java11/Info.plist.template") filter (ReplaceTokens, tokens: [ VERSION: version ]) rename "Info.plist.template", "Info.plist" into "IGV_${version}_java10.app/Contents" into "IGV_${version}.app/Contents" } with copySpec { from ("scripts/java11/IGV_mac.app.command") rename "IGV_mac.app.command", "IGV" into "IGV_${version}.app/Contents/MacOS" } with copySpec { from ("web/IGV_64.png") into "IGV_${version}.app/Contents/Resources" } with copySpec { from ("${buildDir}/IGV-dist/") include 'igv.args' into "IGV_${version}.app/Contents/Java/" } with copySpec { from ("${buildDir}/IGV-dist/lib") include '*.jar' into "IGV_${version}_java10.app/Contents/Java" into "IGV_${version}.app/Contents/Java/lib" } into "${buildDir}/IGV-Mac-dist" into "${buildDir}/IGV-MacApp-dist" doLast { project.exec { commandLine('chmod', '775', "${buildDir}/IGV-Mac-dist/IGV_${version}_java10.app" ) } project.exec { commandLine('chmod', '775', "${buildDir}/IGV-MacApp-dist/IGV_${version}.app" ) } } } task createMacDistZip(type: Zip, dependsOn: createMacDist) { archiveName = "IGV_${version}_java10.app.zip" task createMacAppDistZip(type: Zip, dependsOn: createMacAppDist) { archiveName = "IGV_${version}.app.zip" destinationDir = file("${buildDir}/distZip") from "${buildDir}/IGV-Mac-dist" from "${buildDir}/IGV-MacApp-dist" doLast { project.exec { commandLine('chmod', '775', createMacDistZip.archivePath ) } project.exec { commandLine('chmod', '775', createMacAppDistZip.archivePath ) } } } task createWinDistZip(type: Zip, dependsOn: createDist) { archiveName = "IGV_Win_${version}_java10.zip" destinationDir = file("${buildDir}/distZip") baseName = "IGV_Win" task createWinDist(type: Copy, dependsOn: createDist) { if (!jdkBundleWindows.equals("")) { with copySpec { from jdkBundleWindows into "IGV_${version}/jdk-11" } } with copySpec { from("${buildDir}/IGV-dist") { exclude "*.sh" exclude "igv.command" } into createWinDistZip.baseName + "_${version}_java10" doLast { project.exec { commandLine('chmod', '775', createWinDistZip.archivePath ) } } exclude "*.command" exclude "igvtools*" exclude "igvtools_gui" exclude "igvtools_gui_hidpi" exclude 'lib/genomes' } task createToolsDist(type: Copy, dependsOn: tooljar) { from ("scripts/java9") { include 'igvtools*' include 'igvtools*.bat' include 'igvtools*.command' include 'igv.args' from ("resources") { include "IGV_64.ico" } into "IGV_${version}" } with copySpec { from ("${buildDir}/libs") { include 'igvtools.jar' // Create a build-specific NSIS installer script. from ("scripts/nsis/installer.nsi") filter (ReplaceTokens, tokens: [ VERSION: version ]) } from ("lib") { include '*.jar' exclude 'jide-oss-3.5.5.jar' from ("scripts/nsis") { include "license_win.txt" } into "${buildDir}/IGV-WinExe-dist" } from ("lib_java9") { include '*.jar' task createWinExeDist(type: Exec, dependsOn: createWinDist) { commandLine(makensisCommand, "-O${buildDir}/tmp/nsis-build.log", "${buildDir}/IGV-WinExe-dist/installer.nsi") doLast { if (makensisCommand.equals("")) { throw new GradleException("Required property not set: makensisCommand"); } into "lib" } with copySpec { from ("genomes/sizes") { } into "lib/genomes" } into "${buildDir}/IGVTools-dist" } task createToolsDistZip(type: Zip, dependsOn: createToolsDist) { archiveName = "igvtools_${version}_java10.zip" destinationDir = file("${buildDir}/distZip") baseName = "IGVTools_java10" from "${buildDir}/IGVTools-dist" into createToolsDistZip.baseName task signWinExeDist(type: Exec, dependsOn: createWinExeDist) { standardInput = new ByteArrayInputStream( keyPassword.getBytes() ); commandLine(signcodeCommand, "-spc", spcFile, "-v", pvkFile, "-a", "sha1", "-\$", "commercial", "-n", "IGV ${version}", "-i", "http://www.igv.org/", "-t", tsaurl, "-tr", "10", "${buildDir}/IGV-WinExe-dist/IGV_Win_${version}-installer.exe") doLast { project.exec { commandLine('chmod', '775', createToolsDistZip.archivePath ) } if (signcodeCommand.equals("")) { throw new GradleException("Required property not set: signcodeCommand"); } } } build.dependsOn createDistZip,createMacDistZip,createWinDistZip,createToolsDistZip build.dependsOn createDistZip,createLinuxDistZip,createMacDistZip,createMacAppDistZip if (!makensisCommand.equals("") && !signcodeCommand.equals("")) { build.dependsOn signWinExeDist } No newline at end of file