def compile_target_compatibility
ext {
-
getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION
getdownDir = ""
reportRsyncCmd = false
- switch (CHANNEL) {
+ buildDist = true
+ switch (CHANNEL) {
case "BUILD":
// TODO: get bamboo build artifact URL for getdown artifacts
getdownDir = getdown_channel_name + "/" + JAVA_VERSION
getdown_app_base = getdown_channel_base + "/" + getdownDir
getdown_app_dir = getdown_app_dir_alt
+ if (!file(ARCHIVEDIST).exists()) {
+ print "Must provide an ARCHIVEDIST value to produce an archive distribution"
+ exit(2)
+ } else {
+ packageDir = ARCHIVEDIST
+ buildDist = false
+ }
+ reportRsyncCommand = true
+ break
+
+ case "ARCHIVELOCAL":
+ getdown_channel_name = CHANNEL.toLowerCase()+"/"+JALVIEW_VERSION
+ getdownDir = getdown_channel_name + "/" + JAVA_VERSION
+ //getdown_app_base = getdown_channel_base + "/" + getdownDir
+ getdown_app_base = file(getdownWebsiteDir).toURI().toString()
+ getdown_app_dir = getdown_app_dir_alt
+ if (!file(ARCHIVEDIST).exists()) {
+ print "Must provide an ARCHIVEDIST value to produce an archive distribution"
+ exit(2)
+ } else {
+ packageDir = ARCHIVEDIST
+ buildDist = false
+ }
reportRsyncCommand = true
break
dependsOn cloverInstr
}
- print("Running tests " + (use_clover?"WITH":"WITHOUT") + " clover [clover="+use_clover+"]\n")
+ if (use_clover) {
+ print("Running tests " + (use_clover?"WITH":"WITHOUT") + " clover [clover="+use_clover+"]\n")
+ }
useTestNG() {
includeGroups testngGroups
shadowJar {
group = "distribution"
- dependsOn makeDist
+ if (buildDist) {
+ dependsOn makeDist
+ }
from ("$jalviewDir/$libDistDir") {
include("*.jar")
}
+ manifest {
+ attributes 'Implementation-Version': JALVIEW_VERSION
+ }
mainClassName = shadowJarMainClass
mergeServiceFiles()
- classifier = "all-"+JAVA_VERSION
+ classifier = "all-"+JALVIEW_VERSION+"-j"+JAVA_VERSION
minimize()
}
task getdownWebsite() {
group = "distribution"
description = "Create the getdown minimal app folder, and website folder for this version of jalview. Website folder also used for offline app installer"
- dependsOn makeDist
+ if (buildDist) {
+ dependsOn makeDist
+ }
def getdownWebsiteResourceFilenames = []
def getdownTextString = ""
def getdownResourceDir = project.ext.getdownResourceDir
}
def codeFiles = []
- makeDist.outputs.files.each{ f ->
+ fileTree(file(packageDir)).each{ f ->
if (f.isDirectory()) {
def files = fileTree(dir: f, include: ["*"]).getFiles()
codeFiles += files
from getdownLauncher
into project.ext.getdownWebsiteDir
}
-
- copy {
- from getdown_txt
- from getdownLauncher
- from getdownWebsiteDir+"/"+getdown_build_properties
- into getdownInstallDir
- }
-
+
+ if (CHANNEL != "ARCHIVE" && CHANNEL != "DEVELOP") {
+ copy {
+ from getdown_txt
+ from getdownLauncher
+ from getdownWebsiteDir+"/"+getdown_build_properties
+ into getdownInstallDir
+ }
+
+ copy {
+ from getdownInstallDir
+ into getdownFilesInstallDir
+ }
+ }
+
copy {
from getdown_txt
from launch_jvl
}
copy {
- from getdownInstallDir
- into getdownFilesInstallDir
- }
-
- copy {
from jalviewDir + '/' + project.getProperty('getdown_txt_ui.background_image')
from jalviewDir + '/' + project.getProperty('getdown_txt_ui.error_background')
from jalviewDir + '/' + project.getProperty('getdown_txt_ui.progress_image')
}
}
- inputs.dir(jalviewDir + '/' + packageDir)
+ if (buildDist) {
+ inputs.dir(jalviewDir + '/' + packageDir)
+ }
outputs.dir(project.ext.getdownWebsiteDir)
outputs.dir(project.ext.getdownFilesDir)
}
if (reportRsyncCommand) {
def fromDir = getdownWebsiteDir + (getdownWebsiteDir.endsWith("/")?"":"/")
def toDir = getdown_smb_mount + "/" + getdownDir + (getdownDir.endsWith("/")?"":"/")
- println "rsync -avh --delete '$fromDir' '$toDir'"
+ println "LIKELY RSYNC COMMAND:\nrsync -avh --delete '$fromDir' '$toDir'"
}
}
}
'INSTALL4JINFOPLISTFILEASSOCIATIONS': install4jInfoPlistFileAssociations,
'COPYRIGHT_MESSAGE': install4jCopyrightMessage,
'MACOS_BUNDLE_ID': install4jMacOSBundleId,
+ 'GETDOWN_RESOURCE_DIR': getdown_resource_dir,
'GETDOWN_DIST_DIR': getdown_app_dir,
+ 'GETDOWN_ALT_DIR': getdown_app_dir_alt,
'GETDOWN_INSTALL_DIR': getdown_install_dir
]
)