}
clean {
- delete sourceSets.main.java.outputDir
+ doFirst {
+ delete sourceSets.main.java.outputDir
+ }
}
cleanTest {
- delete sourceSets.test.java.outputDir
- delete cloverInstrDir
+ doFirst {
+ delete sourceSets.test.java.outputDir
+ delete cloverInstrDir
+ }
}
// format is a string like date.format("dd MMMM yyyy")
}
def buildingHTML = "$jalviewDir/$docDir/building.html"
-task deleteBuildingHTML(type: Delete) {
- delete buildingHTML
+task cleanBuildingHTML(type: Delete) {
+ doFirst {
+ delete buildingHTML
+ }
}
task convertBuildingMD(type: Exec) {
- dependsOn deleteBuildingHTML
+ dependsOn cleanBuildingHTML
def buildingMD = "$jalviewDir/$docDir/building.md"
def css = "$jalviewDir/$docDir/github.css"
inputs.file(css)
outputs.file(buildingHTML)
}
+
clean {
- delete buildingHTML
+ doFirst {
+ delete buildingHTML
+ }
}
task syncDocs(type: Sync) {
task cleanPackageDir(type: Delete) {
- delete fileTree("$jalviewDir/$packageDir").include("*.jar")
+ doFirst {
+ delete fileTree("$jalviewDir/$packageDir").include("*.jar")
+ }
}
jar {
dependsOn makeDist
}
- // clean the getdown website and files dir before creating getdown folders
- delete project.ext.getdownWebsiteDir
- delete project.ext.getdownFilesDir
-
def getdownWebsiteResourceFilenames = []
def getdownTextString = ""
def getdownResourceDir = project.ext.getdownResourceDir
def getdownResourceFilenames = []
doFirst {
+ // clean the getdown website and files dir before creating getdown folders
+ delete project.ext.getdownWebsiteDir
+ delete project.ext.getdownFilesDir
+
copy {
from buildProperties
rename(buildPropertiesFile, getdown_build_properties)
}
clean {
- delete project.ext.getdownWebsiteDir
- delete project.ext.getdownFilesDir
+ doFirst {
+ delete project.ext.getdownWebsiteDir
+ delete project.ext.getdownFilesDir
+ }
}
install4j {
}
clean {
- delete install4jConf
+ doFirst {
+ delete install4jConf
+ }
}
task sourceDist (type: Tar) {
}
}
-task jalviewjsEclipseCopyDropins {
+task OLDjalviewjsEclipseCopyDropins {
dependsOn jalviewjsEclipsePaths
def inputFiles = fileTree(dir: jalviewjs_utils_dir+"/"+fromDropinsDir, include: "*.jar")
def outputDir = eclipseDropinsDir
}
}
+// this version (type: Copy) will delete anything in the eclipse dropins folder that isn't in fromDropinsDir
+task jalviewjsEclipseCopyDropins(type: Copy) {
+ from fromDropinsDir
+ into eclipseDropinsDir
+}
+
task jalviewjsCreateJ2sSettings(type: WriteProperties) {
dependsOn jalviewjsSitePath
outputFile (jalviewDir+"/"+jalviewjs_j2s_settings)
property(siteDirProperty,jalviewjsTransferSiteDir)
}
}
+ inputs.properties(props.findAll( { k, v -> k.startsWith("j2s.") } ))
outputs.file(outputFile)
}
inputs.files inputFiles
}
-task jalviewjsTotalClean {
+task cleanJalviewjsAll {
group "JalviewJS"
- description "Delete everything to do with JalviewJS build"
- //delete jalviewjsBuildDir
- delete jalviewDir+"/"+eclipse_bin_dir
- delete file(eclipseWorkspace.getAbsolutePath()+"/.metadata")
- delete jalviewDir+"/"+jalviewjs_j2s_settings
+ description "Delete all configuration and build artifacts to do with JalviewJS build"
+ dependsOn cleanJalviewjsSite
+
+ doFirst {
+ delete jalviewjsBuildDir
+ delete jalviewDir+"/"+eclipse_bin_dir
+ delete file(eclipseWorkspace.getAbsolutePath()+"/.metadata")
+ delete jalviewDir+"/"+jalviewjs_j2s_settings
+ }
}
task jalviewjsProjectImport(type: Exec) {
inputs.dir(sourceDir)
outputs.dir(eclipse_bin_dir+"/main")
outputs.dir(jalviewjsTransferSiteDir)
+ outputs.upToDateWhen { file("${jalviewjsTransferSiteDir}${jalviewjs_server_resource}").exists() }
}
dependsOn jalviewjsPrepareSite
}
-task jalviewjsSiteClean {
- //delete jalviewjsTransferSiteDir
- //delete jalviewjsSiteDir
+task cleanJalviewjsSite {
+ doFirst {
+ delete jalviewjsTransferSiteDir
+ delete jalviewjsSiteDir
+ }
}
task jalviewjsSiteTar(type: Tar) {
task jalviewjsIDESiteClean {
group "JalviewJS in Eclipse"
description "Deletes the Eclipse transpiled site"
- dependsOn jalviewjsSiteClean
+ dependsOn cleanJalviewjsSite
}
task jalviewjsIDEServer {