buildscript {
dependencies {
- classpath 'org.openclover:clover:4.3.1'
+ classpath 'org.openclover:clover:4.4.1'
classpath 'org.apache.commons:commons-compress:1.18'
}
}
reportRsyncCmd = false
buildDist = true
buildProperties = buildPropertiesFile
+ getdownLauncher = jalviewDir + '/' + getdown_lib_dir + '/' + getdown_launcher
switch (CHANNEL) {
case "BUILD":
// TODO: get bamboo build artifact URL for getdown artifacts
+ getdown_channel_base = bamboo_channelbase
+ 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
break
buildDist = false
}
reportRsyncCommand = true
+ getdownLauncher = jalviewDir + '/' + getdown_lib_dir + '/' + getdown_launcher_local
break
case "DEVELOP":
getdown_app_base = file(getdownWebsiteDir).toURI().toString()
getdown_app_dir = getdown_app_dir_alt
buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile
+ getdownLauncher = jalviewDir + '/' + getdown_lib_dir + '/' + getdown_launcher_local
break
default: // something wrong specified
//getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir
getdownResourceDir = getdownWebsiteDir + '/' + getdown_resource_dir
getdownInstallDir = getdownWebsiteDir + '/' + getdown_install_dir
- getdownLauncher = jalviewDir + '/' + getdown_launcher
getdownFilesDir = jalviewDir + '/' + getdown_files_dir + '/' + JAVA_VERSION + '/'
getdownFilesInstallDir = getdownFilesDir+"/"+getdown_install_dir
/* compile without modules -- using classpath libraries
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:"$jalviewDir/$testSourceDir", include: ["**/*.java"]))
+ inputs.files files (sourceSets.main.allJava,sourceSets.test.allJava) // , fileTree(dir:"$jalviewDir/$testSourceDir", include: ["**/*.java"]))
outputs.dir cloverInstrDir
doFirst {
}
+task cloverReportHTML (type: JavaExec) {
+ inputs.dir "${buildDir}/clover"
+ outputs.dir "${reportsDir}/clover"
+
+ classpath configurations.cloverRuntime
+ maxHeapSize "${cloverReportJVMHeap}"
+ jvmArgs += "${cloverReportJVMArgs}"
+ main = "com.atlassian.clover.reporters.html.HtmlReporter"
+ args "--initstring", "${buildDir}/clover/clover.db", "-o", "${reportsDir}/clover"
+ "${cloverReportHTMLOptions}".split(",").each {
+ args+= it.trim()
+ }
+}
+
+task cloverReportXML (type: JavaExec) {
+ inputs.dir "${buildDir}/clover"
+ outputs.dir "${reportsDir}/clover"
+ maxHeapSize "${cloverReportJVMHeap}"
+ jvmArgs "${cloverReportJVMArgs}"
+ classpath configurations.cloverRuntime
+ main = "com.atlassian.clover.reporters.xml.XMLReporter"
+ args "--initstring", "${buildDir}/clover/clover.db", "-o", "${reportsDir}/clover/clover.xml"
+
+ "${cloverReportXMLOptions}".split(",").each {
+ args+= it.trim()
+ }
+}
task cloverReport {
group = "Verification"
- description = "Createst the Clover report"
+ description = "Creates the Clover report"
inputs.dir "${buildDir}/clover"
outputs.dir "${reportsDir}/clover"
onlyIf {
file("${buildDir}/clover/clover.db").exists()
}
- doFirst {
- def argsList = ["--initstring", "${buildDir}/clover/clover.db",
- "-o", "${reportsDir}/clover"]
- String[] args = argsList.toArray()
- com.atlassian.clover.reporters.html.HtmlReporter.runReport(args)
-
- // and generate ${reportsDir}/clover/clover.xml
- args = ["--initstring", "${buildDir}/clover/clover.db",
- "-o", "${reportsDir}/clover/clover.xml"].toArray()
- com.atlassian.clover.reporters.xml.XMLReporter.runReport(args)
- }
+ dependsOn cloverReportXML
+ dependsOn cloverReportHTML
}
// end clover bits
exclude '**/*.gif'
exclude '**/*.jpg'
exclude '**/*.png'
- filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['Version-Rel': JALVIEW_VERSION])
+ filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['Version-Rel': JALVIEW_VERSION,'Year-Rel': getDate("yyyy")])
}
from(inputDir) {
include '**/*.gif'
outputs.file(helplinkscheckertouchfile)
}
+// import the pubhtmlhelp target
+ant.properties.basedir = "$jalviewDir"
+ant.properties.helpBuildDir = jalviewDirAbsolutePath+"/$classes/$helpDir"
+ant.importBuild "$utilsDir/publishHelp.xml"
+
+
task cleanPackageDir(type: Delete) {
delete fileTree("$jalviewDir/$packageDir").include("*.jar")
}
copy {
from getdownLauncher
+ if (file(getdownLauncher).getName() != getdown_launcher) {
+ rename(file(getdownLauncher).getName(), getdown_launcher)
+ }
into project.ext.getdownWebsiteDir
}
from getdown_txt
from getdownLauncher
from getdownWebsiteDir+"/"+getdown_build_properties
+ if (file(getdownLauncher).getName() != getdown_launcher) {
+ rename(file(getdownLauncher).getName(), getdown_launcher)
+ }
into getdownInstallDir
}
from launch_jvl
from getdownLauncher
from getdownWebsiteDir+"/"+getdown_build_properties
+ if (file(getdownLauncher).getName() != getdown_launcher) {
+ rename(file(getdownLauncher).getName(), getdown_launcher)
+ }
into getdownFilesDir
}
group = "distribution"
description = "Digest the getdown website folder"
dependsOn getdownWebsite
- classpath = files(jalviewDir + '/' + getdown_core, jalviewDir+'/'+getdown_launcher)
+ doFirst {
+ classpath = files(getdownWebsiteDir + '/' + getdown_launcher)
+ }
main = "com.threerings.getdown.tools.Digester"
args project.ext.getdownWebsiteDir
inputs.dir(project.ext.getdownWebsiteDir)
}
task sourceDist (type: Tar) {
- archiveClassifier = "source-" + JALVIEW_VERSION
- from jalviewDir
- into project.name + "-" + JALVIEW_VERSION
+ def VERSION_UNDERSCORES = JALVIEW_VERSION.replaceAll("\\.", "_")
+ def outputFileName = project.name + "_" + VERSION_UNDERSCORES + ".tar.gz"
+ // cater for buildship < 3.1 [3.0.1 is max version in eclipse 2018-09]
+ try {
+ archiveFileName = outputFileName
+ } catch (Exception e) {
+ archiveName = outputFileName
+ }
+
+ compression Compression.GZIP
- exclude (".*")
- exclude ("**/.*")
- exclude ("*.class")
- exclude ("**/*.class")
- include (eclipse_extra_jdt_prefs_file)
- include ("LICENSE")
- include ("README")
- include ("build.gradle")
- include ("gradle.properties")
- //include ("jalview-jalopy.xml")
- //include ("JalviewApplet.jpx")
- //include ("JalviewX.jpx")
- //include ("nbbuild.xml")
- //include ("nbproject/genfiles.properties")
- //include ("nbproject/project.properties")
- //include ("nbproject/project.xml")
- include ("$sourceDir/*.java")
- include ("$sourceDir/**/*.java")
- include ("$sourceDir/**/*.cdr")
- include ("$j8libDir/**/*.jar")
- include ("$j11libDir/**/*.jar")
- include ("$resourceDir/**/*")
- include ("$helpDir/**/*")
- exclude ("appletlib")
- exclude ("**/*locales")
- exclude ("*locales/**")
- exclude ("utils/InstallAnywhere")
- include ("$schemaDir/**/*")
- include ("$utilsDir/**/*")
- include ("$docDir/**/*")
- include ("$examplesDir/**/*")
- include ("getdown/**/*")
- exclude (getdown_files_dir)
- exclude (getdown_website_dir)
+ into project.name
+
+ def EXCLUDE_FILES=[
+ "build/*",
+ "bin/*",
+ "test-output/",
+ "test-reports",
+ "tests",
+ "clover*/*",
+ ".*",
+ "benchmarking/*",
+ "**/.*",
+ "*.class",
+ "**/*.class","$j11modDir/**/*.jar","appletlib","**/*locales",
+ "*locales/**",
+ "utils/InstallAnywhere",
+ "**/*.log",
+ ]
+ def PROCESS_FILES=[
+ "AUTHORS",
+ "CITATION",
+ "FEATURETODO",
+ "JAVA-11-README",
+ "FEATURETODO",
+ "LICENSE",
+ "**/README",
+ "RELEASE",
+ "THIRDPARTYLIBS",
+ "TESTNG",
+ "build.gradle",
+ "gradle.properties",
+ "**/*.java",
+ "**/*.html",
+ "**/*.xml",
+ "**/*.gradle",
+ "**/*.groovy",
+ "**/*.properties",
+ "**/*.perl",
+ "**/*.sh",
+ ]
+ def INCLUDE_FILES=[
+ ".settings/org.eclipse.jdt.core.jalview.prefs",
+ ]
+ from(jalviewDir) {
+ exclude (EXCLUDE_FILES)
+ include (PROCESS_FILES)
+ filter(ReplaceTokens, beginToken: '$$', endToken: '$$', tokens: ['Version-Rel': JALVIEW_VERSION,'Year-Rel': getDate("yyyy")])
+ }
+ from(jalviewDir) {
+ exclude (EXCLUDE_FILES)
+ exclude (PROCESS_FILES)
+ exclude ("appletlib")
+ exclude ("**/*locales")
+ exclude ("*locales/**")
+ exclude ("utils/InstallAnywhere")
+
+ exclude (getdown_files_dir)
+ exclude (getdown_website_dir)
+
+ // exluding these as not using jars as modules yet
+ exclude ("$j11modDir/**/*.jar")
+ }
+ from(jalviewDir) {
+ include(INCLUDE_FILES)
+ }
+// from (jalviewDir) {
+// // explicit includes for stuff that seemed to not get included
+// include(fileTree("test/**/*."))
+// exclude(EXCLUDE_FILES)
+// exclude(PROCESS_FILES)
+// }
}
+task helppages {
+ dependsOn copyHelp
+ dependsOn pubhtmlhelp
+
+ inputs.dir("$classes/$helpDir")
+ outputs.dir("$helpOutputDir")
+}