JAL-3348 fixed an internal href in help to allow building
[jalview.git] / build.gradle
index 1f16133..2332643 100644 (file)
@@ -153,8 +153,10 @@ ext {
   getdownLauncher = jalviewDir + '/' + getdown_launcher
   getdownFilesDir = jalviewDir + '/' + getdown_files_dir + '/' + JAVA_VERSION + '/'
   getdownFilesInstallDir = getdownFilesDir+"/"+getdown_install_dir
+  /* compile without modules -- using classpath libraries
   modules_compileClasspath = fileTree(dir: "$jalviewDir/$j11modDir", include: ["*.jar"])
   modules_runtimeClasspath = modules_compileClasspath
+  */
   gitHash = ""
   gitBranch = ""
 }
@@ -189,10 +191,12 @@ if (JAVA_VERSION.equals("1.8")) {
   getdown_alt_java_max_version = getdown_alt_java11_max_version
   getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
   eclipse_java_runtime_name = "JavaSE-11"
+  /* compile without modules -- using classpath libraries
   additional_compiler_args += [
   '--module-path', ext.modules_compileClasspath.asPath,
   '--add-modules', j11modules
   ]
+  */
 } else if (JAVA_VERSION.equals("12") || JAVA_VERSION.equals("13")) {
   JAVA_INTEGER_VERSION = JAVA_VERSION
   libDir = j11libDir
@@ -203,10 +207,12 @@ if (JAVA_VERSION.equals("1.8")) {
   getdown_alt_java_max_version = getdown_alt_java11_max_version
   getdown_alt_multi_java_location = getdown_alt_java11_txt_multi_java_location
   eclipse_java_runtime_name = "JavaSE-11"
+  /* compile without modules -- using classpath libraries
   additional_compiler_args += [
   '--module-path', ext.modules_compileClasspath.asPath,
   '--add-modules', j11modules
   ]
+  */
 } else {
   throw new GradleException("JAVA_VERSION=$JAVA_VERSION not currently supported by Jalview")
 }
@@ -741,6 +747,12 @@ task linkCheck(type: JavaExec) {
   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")
 }
@@ -1142,3 +1154,70 @@ clean {
   delete install4jConf
 }
 
+task sourceDist (type: Tar) {
+  
+  def VERSION_UNDERSCORES = JALVIEW_VERSION.replaceAll("\\.", "_")
+  archiveFileName = project.name + "_" + VERSION_UNDERSCORES + ".tar.gz"
+  
+  compression Compression.GZIP
+  
+  from jalviewDir
+  into project.name
+   
+  exclude (".*")
+  exclude ("**/.*")
+  exclude ("*.class")
+  exclude ("**/*.class")
+  include (eclipse_extra_jdt_prefs_file)
+  include ("AUTHORS")
+  include ("CITATION")
+  include ("FEATURETODO")
+  include ("JAVA-11-README")
+  include ("FEATURETODO")
+  include ("LICENSE")
+  include ("README")
+  include ("RELEASE")
+  include ("THIRDPARTYLIBS")
+  include ("build.gradle")
+  include ("gradle.properties")
+  include ("$sourceDir/*.java")
+  include ("$sourceDir/**/*.java")
+  include ("$sourceDir/**/*.cdr")
+  include ("$j8libDir/**/*.jar")
+  include ("$j11libDir/**/*.jar")
+  include ("$resourceDir/**/*")
+  include ("$helpDir/**/*")
+  include ("$schemaDir/**/*")
+  include ("$utilsDir/**/*")
+  include ("$docDir/**/*")
+  include ("$examplesDir/**/*")
+  include ("getdown/**/*")
+  //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")
+  
+  exclude ("appletlib")
+  exclude ("**/*locales")
+  exclude ("*locales/**")
+  exclude ("utils/InstallAnywhere")
+  exclude (libDir)
+  exclude (getdown_files_dir)
+  exclude (getdown_website_dir)
+
+  // exluding these as not using jars as modules yet
+  exclude ("$j11modDir/**/*.jar")
+
+}
+
+task helppages  {
+  dependsOn copyHelp
+  dependsOn pubhtmlhelp
+  
+  inputs.dir("$classes/$helpDir")
+  outputs.file("build/distribution/help/helpTOC.html")
+}