buildscript {
dependencies {
- classpath 'org.openclover:clover:4.3.1'
+ classpath 'org.openclover:clover:4.4.1'
}
}
getdownAppDistDir = getdown_app_dir_alt
buildProperties = string("${classesDir}/${build_properties_file}")
reportRsyncCmd = false
+ jvlChannelName = CHANNEL.toLowerCase()
switch (CHANNEL) {
case "BUILD":
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}"
break
case "RELEASE":
reportRsyncCommand = true
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}")
+ }
+ break
+
case "LOCAL":
getdownAppBase = file(getdownWebsiteDir).toURI().toString()
getdownLauncher = string("${jalviewDir}/${getdown_lib_dir}/${getdown_launcher_local}")
getdownAppBase = string(getProperty("getdown_appbase_override"))
println("Overriding getdown appbase with '${getdownAppBase}'")
}
+ // sanitise file name for jalview launcher file for this channel
+ jvlChannelName = jvlChannelName.replaceAll(/[^\w\-]/,"_")
getdownAppDir = string("${getdownWebsiteDir}/${getdownAppDistDir}")
//getdownJ11libDir = "${getdownWebsiteDir}/${getdown_j11lib_dir}"
compileClasspath = files( sourceSets.test.java.outputDir )
if (use_clover) {
- compileClasspath += sourceSets.clover.compileClasspath
+ compileClasspath = sourceSets.clover.compileClasspath
} else {
compileClasspath += files(sourceSets.main.java.outputDir)
}
// clover bits
dependencies {
if (use_clover) {
- cloverCompile 'org.openclover:clover:4.3.1'
- testCompile 'org.openclover:clover:4.3.1'
+ cloverCompile 'org.openclover:clover:4.4.1'
+ testCompile 'org.openclover:clover:4.4.1'
}
}
task cloverInstr() {
// only instrument source, we build test classes as normal
- inputs.files files (sourceSets.main.allJava) // , fileTree(dir: testSourceDir, include: ["**/*.java"]))
+ inputs.files files (sourceSets.main.allJava,sourceSets.test.allJava) // , fileTree(dir:"$jalviewDir/$testSourceDir", include: ["**/*.java"]))
outputs.dir cloverInstrDir
doFirst {
def getdown_txt = file("${getdownWebsiteDir}/getdown.txt")
getdown_txt.write(getdownTextString)
- def getdownLaunchJvl = ( (getdownChannelName != null && getdownChannelName.length() > 0)?"${getdownChannelName}_":"" ) + getdown_launch_jvl
- def launch_jvl = file("${getdownWebsiteDir}/${getdown_launch_jvl}")
- launch_jvl.write("appbase="+props.get("getdown_txt_appbase"))
+ def getdownLaunchJvl = getdown_launch_jvl_name + ( (jvlChannelName != null && jvlChannelName.length() > 0)?"-${jvlChannelName}":"" ) + ".jvl"
+ def launchJvl = file("${getdownWebsiteDir}/${getdownLaunchJvl}")
+ launchJvl.write("appbase="+props.get("getdown_txt_appbase"))
copy {
from getdownLauncher
copy {
from getdown_txt
- from launch_jvl
+ from launchJvl
from getdownLauncher
from "${getdownWebsiteDir}/${getdown_build_properties}"
if (file(getdownLauncher).getName() != getdown_launcher) {
}
+// a helper task to allow getdown digest of any dir: `gradle getdownDigestDir -PDIGESTDIR=/path/to/my/random/getdown/dir
+task getdownDigestDir(type: JavaExec) {
+ def digestDirPropertyName = "DIGESTDIR"
+ description = "Digest a local dir (-P${digestDirPropertyName}=...) for getdown"
+ doFirst {
+ classpath = files(getdownLauncher)
+ def digestDir = findProperty(digestDirPropertyName)
+ if (digestDir == null) {
+ throw new GradleException("Must provide a DIGESTDIR value to produce an alternative getdown digest")
+ }
+ args digestDir
+ }
+ main = "com.threerings.getdown.tools.Digester"
+}
+
+
task getdownDigest(type: JavaExec) {
group = "distribution"
description = "Digest the getdown website folder"