JAL-3753 ensure correct dependencies for shadowJar task
authorBen Soares <b.soares@dundee.ac.uk>
Mon, 28 Sep 2020 15:57:51 +0000 (16:57 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Mon, 28 Sep 2020 15:57:51 +0000 (16:57 +0100)
build.gradle

index 789aaea..f298bd7 100644 (file)
@@ -1223,12 +1223,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 +1295,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 +1309,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 +1346,8 @@ task cleanPackageDir(type: Delete) {
 
 
 jar {
-  dependsOn linkCheck
-  dependsOn buildIndices
-  dependsOn createBuildProperties
   dependsOn prepare
+  dependsOn linkCheck
 
   manifest {
     attributes "Main-Class": main_class,