JAL-3289 Start looking at automating location in appbase more sensibly
[jalview.git] / build.gradle
index 21ecde6..980a4f7 100644 (file)
@@ -51,15 +51,22 @@ def compile_source_compatibility
 def compile_target_compatibility
 
 ext {
+  if (getdown_local == "true") {
+    getdown_app_base = file(getdownWebsiteDir).toURI().toString()
+    getdown_channel_name = "local"
+  } else {
+    getdown_app_base = getdown_channel_base+"/"+getdown_channel_name+"/"+JAVA_VERSION+"/"
+  }
+  if (getdown_channel_name.equals("release") {
+    getdown_app_dir = getdown_channel_name
+  }
   // where the getdown channel will be built.
-  // TODO: consider allowing this expression to  be overridden by -P arg
   getdownWebsiteDir = jalviewDir + '/' + getdown_website_dir + '/' + JAVA_VERSION
   getdownAppDir = getdownWebsiteDir + '/' + getdown_app_dir
   //getdownJ11libDir = getdownWebsiteDir + '/' + getdown_j11lib_dir
   getdownResourceDir = getdownWebsiteDir + '/' + getdown_resource_dir
   getdownLauncher = jalviewDir + '/' + getdown_launcher
   getdownFilesDir = jalviewDir + '/' + getdown_files_dir + '/' + JAVA_VERSION + '/'
-  getdown_app_base = getdown_channel_base+"/"+getdown_channel_name+"/"+JAVA_VERSION+"/"
   modules_compileClasspath = fileTree(dir: "$jalviewDir/$j11modDir", include: ["*.jar"])
   modules_runtimeClasspath = modules_compileClasspath
   gitHash = ""
@@ -736,9 +743,6 @@ task getdownWebsite() {
     props.put("getdown_txt_multi_java_location", getdown_alt_multi_java_location)
        props.put("getdown_txt_resource", "$classes/$buildPropertiesFile")
 
-    if (getdown_local == "true") {
-      getdown_app_base = file(getdownWebsiteDir).toURI().toString()
-    }
     props.put("getdown_txt_appbase", getdown_app_base)
     props.each{ prop, val ->
       if (prop.startsWith("getdown_txt_") && val != null) {