X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=ed0182d3a8f8d3e2cdad1b242a2af4f7aa597d6f;hb=55729191375e41a426326c2f39997f19060038e3;hp=072a7b4377a840a9948175944d50a94c4353488b;hpb=9e458b702f71b2db6adb919d88f93fc0bedc5178;p=jalview.git diff --git a/build.gradle b/build.gradle index 072a7b4..ed0182d 100644 --- a/build.gradle +++ b/build.gradle @@ -111,7 +111,7 @@ ext { } //// // Set JALVIEW_VERSION if it is not already set - if (findProperty(JALVIEW_VERSION)==null || "".equals(JALVIEW_VERSION)) { + if (findProperty("JALVIEW_VERSION")==null || "".equals(JALVIEW_VERSION)) { JALVIEW_VERSION = releaseProps.get("jalview.version") } @@ -1084,6 +1084,7 @@ def convertMdToHtml (FileTree mdFiles, File cssFile) { def htmlFilePath = mdFile.getPath().replaceAll(/\..*?$/, ".html") def htmlFile = file(htmlFilePath) + println("Creating ${htmlFilePath}") htmlFile.text = htmlText } } @@ -1121,7 +1122,7 @@ task copyDocs(type: Copy) { task convertMdFiles { dependsOn copyDocs - def mdFiles = fileTree(dir: docBuildDir, include: "*.md") + def mdFiles = fileTree(dir: docBuildDir, include: "**/*.md") def cssFile = file("${jalviewDir}/${flexmark_css}") doLast { @@ -1223,12 +1224,33 @@ task createBuildProperties(type: WriteProperties) { } +task buildIndices(type: JavaExec) { + dependsOn copyHelp + classpath = sourceSets.main.compileClasspath + main = "com.sun.java.help.search.Indexer" + workingDir = "${helpBuildDir}/${help_dir}" + def argDir = "html" + args = [ argDir ] + inputs.dir("${workingDir}/${argDir}") + + outputs.dir("${classesDir}/doc") + outputs.dir("${classesDir}/help") + outputs.file("${workingDir}/JavaHelpSearch/DOCS") + outputs.file("${workingDir}/JavaHelpSearch/DOCS.TAB") + outputs.file("${workingDir}/JavaHelpSearch/OFFSETS") + outputs.file("${workingDir}/JavaHelpSearch/POSITIONS") + outputs.file("${workingDir}/JavaHelpSearch/SCHEMA") + outputs.file("${workingDir}/JavaHelpSearch/TMAP") +} + + task prepare { dependsOn copyResources dependsOn copyDocs dependsOn copyHelp dependsOn createBuildProperties dependsOn convertMdFiles + dependsOn buildIndices } @@ -1274,26 +1296,6 @@ test { } -task buildIndices(type: JavaExec) { - dependsOn copyHelp - classpath = sourceSets.main.compileClasspath - main = "com.sun.java.help.search.Indexer" - workingDir = "${helpBuildDir}/${help_dir}" - def argDir = "html" - args = [ argDir ] - inputs.dir("${workingDir}/${argDir}") - - outputs.dir("${classesDir}/doc") - outputs.dir("${classesDir}/help") - outputs.file("${workingDir}/JavaHelpSearch/DOCS") - outputs.file("${workingDir}/JavaHelpSearch/DOCS.TAB") - outputs.file("${workingDir}/JavaHelpSearch/OFFSETS") - outputs.file("${workingDir}/JavaHelpSearch/POSITIONS") - outputs.file("${workingDir}/JavaHelpSearch/SCHEMA") - outputs.file("${workingDir}/JavaHelpSearch/TMAP") -} - - task compileLinkCheck(type: JavaCompile) { options.fork = true classpath = files("${jalviewDir}/${utils_dir}") @@ -1308,7 +1310,8 @@ task compileLinkCheck(type: JavaCompile) { task linkCheck(type: JavaExec) { - dependsOn prepare, compileLinkCheck + dependsOn prepare + dependsOn compileLinkCheck def helpLinksCheckerOutFile = file("${jalviewDir}/${utils_dir}/HelpLinksChecker.out") classpath = files("${jalviewDir}/${utils_dir}") @@ -1344,10 +1347,8 @@ task cleanPackageDir(type: Delete) { jar { - dependsOn linkCheck - dependsOn buildIndices - dependsOn createBuildProperties dependsOn prepare + dependsOn linkCheck manifest { attributes "Main-Class": main_class, @@ -1357,7 +1358,8 @@ jar { "Implementation-Version": JALVIEW_VERSION } - destinationDirectory = file("${jalviewDir}/${package_dir}") + def outputDir = "${jalviewDir}/${package_dir}" + destinationDirectory = file(outputDir) archiveFileName = rootProject.name+".jar" exclude "cache*/**" @@ -1370,7 +1372,7 @@ jar { sourceSets.main.resources.srcDirs.each{ dir -> inputs.dir(dir) } - outputs.file("${destinationDirectory}/${archiveFileName}") + outputs.file("${outputDir}/${archiveFileName}") }