- // clover
- useClover = clover.equals("true")
- cloverBuildDir = "${buildDir}/clover"
- cloverInstrDir = file("${cloverBuildDir}/clover-instr")
- cloverClassesDir = file("${cloverBuildDir}/clover-classes")
- cloverReportDir = file("${buildDir}/reports/clover")
- cloverTestInstrDir = file("${cloverBuildDir}/clover-test-instr")
- cloverTestClassesDir = file("${cloverBuildDir}/clover-test-classes")
- //cloverTestClassesDir = cloverClassesDir
- cloverDb = string("${cloverBuildDir}/clover.db")
-
- resourceClassesDir = useClover ? cloverClassesDir : classesDir
-
- testSourceDir = useClover ? cloverTestInstrDir : testDir
- testClassesDir = useClover ? cloverTestClassesDir : "${jalviewDir}/${test_output_dir}"
-
- getdownWebsiteDir = string("${jalviewDir}/${getdown_website_dir}/${JAVA_VERSION}")
- buildDist = true
-
- // the following values might be overridden by the CHANNEL switch
- getdownChannelName = CHANNEL.toLowerCase()
- getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
- getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
- getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher}")
- getdownAppDistDir = getdown_app_dir_alt
- buildProperties = string("${classesDir}/${build_properties_file}")
- reportRsyncCommand = false
- jvlChannelName = CHANNEL.toLowerCase()
- install4jSuffix = CHANNEL.substring(0, 1).toUpperCase() + CHANNEL.substring(1).toLowerCase(); // BUILD -> Build
- install4jDSStore = "DS_Store-NON-RELEASE"
- install4jDMGBackgroundImage = "jalview_dmg_background-NON-RELEASE.png"
- install4jInstallerName = "${jalview_name} Non-Release Installer"
- install4jExecutableName = jalview_name.replaceAll("[^\\w]+", "_").toLowerCase()
- install4jExtraScheme = "jalviewx"
- switch (CHANNEL) {
-
- case "BUILD":
- // TODO: get bamboo build artifact URL for getdown artifacts
- getdown_channel_base = bamboo_channelbase
- getdownChannelName = string("${bamboo_planKey}/${JAVA_VERSION}")
- getdownAppBase = string("${bamboo_channelbase}/${bamboo_planKey}${bamboo_getdown_channel_suffix}/${JAVA_VERSION}")
- jvlChannelName += "_${getdownChannelName}"
- // automatically add the test group Not-bamboo for exclusion
- if ("".equals(testng_excluded_groups)) {
- testng_excluded_groups = "Not-bamboo"
- }
- install4jExtraScheme = "jalviewb"
- break
-
- case "RELEASE":
- getdownAppDistDir = getdown_app_dir_release
- reportRsyncCommand = true
- install4jSuffix = ""
- install4jDSStore = "DS_Store"
- install4jDMGBackgroundImage = "jalview_dmg_background.png"
- install4jInstallerName = "${jalview_name} Installer"
- break
-
- case "ARCHIVE":
- getdownChannelName = CHANNEL.toLowerCase()+"/${JALVIEW_VERSION}"
- getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
- getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
- if (!file("${ARCHIVEDIR}/${package_dir}").exists()) {
- throw new GradleException("Must provide an ARCHIVEDIR value to produce an archive distribution")
- } else {
- package_dir = string("${ARCHIVEDIR}/${package_dir}")
- buildProperties = string("${ARCHIVEDIR}/${classes_dir}/${build_properties_file}")
- buildDist = false
- }
- reportRsyncCommand = true
- install4jExtraScheme = "jalviewa"
- break
-
- case "ARCHIVELOCAL":
- getdownChannelName = string("archive/${JALVIEW_VERSION}")
- getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
- getdownAppBase = file(getdownWebsiteDir).toURI().toString()
- if (!file("${ARCHIVEDIR}/${package_dir}").exists()) {
- throw new GradleException("Must provide an ARCHIVEDIR value to produce an archive distribution")
- } else {
- package_dir = string("${ARCHIVEDIR}/${package_dir}")
- buildProperties = string("${ARCHIVEDIR}/${classes_dir}/${build_properties_file}")
- buildDist = false
- }
- reportRsyncCommand = true
- getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
- install4jSuffix = "Archive"
- install4jExtraScheme = "jalviewa"
- break
-
- case "DEVELOP":
- reportRsyncCommand = true
-
- // DEVELOP-RELEASE is usually associated with a Jalview release series so set the version
- JALVIEW_VERSION=JALVIEW_VERSION+"-develop"
-
- install4jSuffix = "Develop"
- install4jDSStore = "DS_Store-DEVELOP"
- install4jDMGBackgroundImage = "jalview_dmg_background-DEVELOP.png"
- install4jExtraScheme = "jalviewd"
- install4jInstallerName = "${jalview_name} Develop Installer"
- break
-
- case "TEST-RELEASE":
- reportRsyncCommand = true
-
- // TEST-RELEASE is usually associated with a Jalview release series so set the version
- JALVIEW_VERSION=JALVIEW_VERSION+"-test"
-
- install4jSuffix = "Test"
- install4jDSStore = "DS_Store-TEST-RELEASE"
- install4jDMGBackgroundImage = "jalview_dmg_background-TEST.png"
- install4jExtraScheme = "jalviewt"
- install4jInstallerName = "${jalview_name} Test Installer"
- break
-
- case ~/^SCRATCH(|-[-\w]*)$/:
- getdownChannelName = CHANNEL
- getdownDir = string("${getdownChannelName}/${JAVA_VERSION}")
- getdownAppBase = string("${getdown_channel_base}/${getdownDir}")
- reportRsyncCommand = true
- install4jSuffix = "Scratch"
- break
-
- case "TEST-LOCAL":
- if (!file("${LOCALDIR}").exists()) {
- throw new GradleException("Must provide a LOCALDIR value to produce a local distribution")
- } else {
- getdownAppBase = file(file("${LOCALDIR}").getAbsolutePath()).toURI().toString()
- getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
- }
- JALVIEW_VERSION = "TEST"
- install4jSuffix = "Test-Local"
- install4jDSStore = "DS_Store-TEST-RELEASE"
- install4jDMGBackgroundImage = "jalview_dmg_background-TEST.png"
- install4jExtraScheme = "jalviewt"
- install4jInstallerName = "${jalview_name} Test Installer"
- break
-
- case "LOCAL":
- getdownAppBase = file(getdownWebsiteDir).toURI().toString()
- getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
- install4jExtraScheme = "jalviewl"
- break
-
- default: // something wrong specified
- throw new GradleException("CHANNEL must be one of BUILD, RELEASE, ARCHIVE, DEVELOP, TEST-RELEASE, SCRATCH-..., LOCAL [default]")
- break