getdownDir = ""
reportRsyncCmd = false
buildDist = true
- buildProperties = buildPropertiesFile
+ buildProperties = build_properties_file
getdownLauncher = "${jalviewDir}/${getdown_lib_dir}/${getdown_launcher}"
switch (CHANNEL) {
getdown_channel_name = "${bamboo_planKey}/${JAVA_VERSION}"
getdown_app_base = "${bamboo_channelbase}/${bamboo_planKey}${bamboo_getdown_channel_suffix}/${JAVA_VERSION}"
getdown_app_dir = getdown_app_dir_alt
- buildProperties = "${jalviewDir}/${classesDir}/${buildPropertiesFile}"
+ buildProperties = "${jalviewDir}/${classesDir}/${build_properties_file}"
break
case "RELEASE":
getdownDir = "${getdown_channel_name}/${JAVA_VERSION}"
getdown_app_base = "${getdown_channel_base}/${getdownDir}"
getdown_app_dir = getdown_app_dir_release
- buildProperties = "${jalviewDir}/${classesDir}/${buildPropertiesFile}"
+ buildProperties = "${jalviewDir}/${classesDir}/${build_properties_file}"
reportRsyncCommand = true
break
exit
} else {
packageDir = "${ARCHIVEDIR}/${packageDir}"
- buildProperties = "${ARCHIVEDIR}/${classesDir}/${buildPropertiesFile}"
+ buildProperties = "${ARCHIVEDIR}/${classesDir}/${build_properties_file}"
buildDist = false
}
reportRsyncCommand = true
exit
} else {
packageDir = "${ARCHIVEDIR}/${packageDir}"
- buildProperties = "${ARCHIVEDIR}/${classesDir}/${buildPropertiesFile}"
+ buildProperties = "${ARCHIVEDIR}/${classesDir}/${build_properties_file}"
buildDist = false
}
reportRsyncCommand = true
getdownDir = "${getdown_channel_name}/${JAVA_VERSION}"
getdown_app_base = "${getdown_channel_base}/${getdownDir}"
getdown_app_dir = getdown_app_dir_alt
- buildProperties = "${jalviewDir}/${classesDir}/${buildPropertiesFile}"
+ buildProperties = "${jalviewDir}/${classesDir}/${build_properties_file}"
reportRsyncCommand = true
break
getdownDir = "${getdown_channel_name}/${JAVA_VERSION}"
getdown_app_base = "${getdown_channel_base}/${getdownDir}"
getdown_app_dir = getdown_app_dir_alt
- buildProperties = "${jalviewDir}/${classesDir}/${buildPropertiesFile}"
+ buildProperties = "${jalviewDir}/${classesDir}/${build_properties_file}"
reportRsyncCommand = true
break
getdownDir = "${getdown_channel_name}/${JAVA_VERSION}"
getdown_app_base = "${getdown_channel_base}/${getdownDir}"
getdown_app_dir = getdown_app_dir_alt
- buildProperties = "${jalviewDir}/${classesDir}/${buildPropertiesFile}"
+ buildProperties = "${jalviewDir}/${classesDir}/${build_properties_file}"
reportRsyncCommand = true
break
case "LOCAL":
getdown_app_base = file(getdownWebsiteDir).toURI().toString()
getdown_app_dir = getdown_app_dir_alt
- buildProperties = "${jalviewDir}/${classesDir}/${buildPropertiesFile}"
+ buildProperties = "${jalviewDir}/${classesDir}/${build_properties_file}"
getdownLauncher = "${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}"
break
task createBuildProperties(type: WriteProperties) {
dependsOn setGitVals
inputs.dir("${jalviewDir}/${sourceDir}")
- inputs.dir("${classes}")
inputs.dir("${jalviewDir}/${resourceDir}")
+ file(buildProperties).getParentFile().mkdirs()
outputFile (buildProperties)
// taking time specific comment out to allow better incremental builds
comment "--Jalview Build Details--\n"+getDate("yyyy-MM-dd HH:mm:ss")
copy {
from buildProperties
- rename(buildPropertiesFile, getdown_build_properties)
+ rename(build_properties_file, getdown_build_properties)
into project.ext.getdownAppDir
}
getdownWebsiteResourceFilenames += "${getdown_app_dir}/${getdown_build_properties}"
inputs.files inputFiles
}
+task jalviewjsSyncBuildProperties (type: Sync) {
+ dependsOn jalviewjsSitePath
+ dependsOn createBuildProperties
+ def inputFiles = [file(buildProperties)]
+ def outputDir = "${jalviewDir}/${jalviewjsSiteDir}/${jalviewjs_j2s_subdir}"
+
+ from inputFiles
+ into outputDir
+ def outputFiles = []
+ rename { filename ->
+ outputFiles += "${outputDir}/${filename}"
+ null
+ }
+ preserve {
+ include "**"
+ }
+ outputs.files outputFiles
+ inputs.files inputFiles
+}
+
task jalviewjsProjectImport(type: Exec) {
dependsOn eclipseSetup
dependsOn jalviewjsEclipsePaths
outputs.upToDateWhen( { file("${jalviewDir}/${jalviewjsTransferSiteJSDir}${jalviewjs_server_resource}").exists() } )
}
+// this Copy version of TransferSite will delete anything else in the target dir
task jalviewjsCopyTransferSite(type: Copy) {
dependsOn jalviewjsTranspile
from "${jalviewDir}/${jalviewjsTransferSiteJSDir}"
into "${jalviewDir}/${jalviewjsSiteDir}"
}
-// this Sync version is used by buildship to keep the website automatically up to date when a file changes
+// this Sync version of TransferSite is used by buildship to keep the website automatically up to date when a file changes
task jalviewjsSyncTransferSite(type: Sync) {
from "${jalviewDir}/${jalviewjsTransferSiteJSDir}"
include "**/*.*"
jalviewjsSyncLib.mustRunAfter jalviewjsCopyTransferSite
jalviewjsSyncResources.mustRunAfter jalviewjsCopyTransferSite
jalviewjsSyncSiteResources.mustRunAfter jalviewjsCopyTransferSite
+jalviewjsSyncBuildProperties.mustRunAfter jalviewjsCopyTransferSite
jalviewjsSyncLib.mustRunAfter jalviewjsSyncTransferSite
jalviewjsSyncResources.mustRunAfter jalviewjsSyncTransferSite
jalviewjsSyncSiteResources.mustRunAfter jalviewjsSyncTransferSite
+jalviewjsSyncBuildProperties.mustRunAfter jalviewjsSyncTransferSite
task jalviewjsPrepareSite {
group "JalviewJS"
dependsOn jalviewjsSyncLib
dependsOn jalviewjsSyncResources
dependsOn jalviewjsSyncSiteResources
+ dependsOn jalviewjsSyncBuildProperties
}
task jalviewjsBuildSite {