JAL-3337 added sourceDist task to gradle. Creates tar file in builds/distribution...
authorBen Soares <bsoares@dundee.ac.uk>
Mon, 1 Jul 2019 10:50:33 +0000 (11:50 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Mon, 1 Jul 2019 10:50:33 +0000 (11:50 +0100)
build.gradle
gradle.properties

index 64373c0..883eede 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")
 }
@@ -1145,7 +1151,43 @@ clean {
 task sourceDist (type: Tar) {
   archiveClassifier = "source-" + JALVIEW_VERSION
   
+  from jalviewDir
+  into project.name + "-" + JALVIEW_VERSION
   
-  
+  exclude (".*")
+  exclude ("**/.*")
+  exclude ("*.class")
+  exclude ("**/*.class")
+  include (eclipse_extra_jdt_prefs_file)
+  include ("LICENSE")
+  include ("README")
+  include ("build.gradle")
+  include ("gradle.properties")
+  //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")
+  include ("$sourceDir/*.java")
+  include ("$sourceDir/**/*.java")
+  include ("$sourceDir/**/*.cdr")
+  include ("$j8libDir/**/*.jar")
+  include ("$j11libDir/**/*.jar")
+  include ("$resourceDir/**/*")
+  include ("$helpDir/**/*")
+  exclude ("appletlib")
+  exclude ("**/*locales")
+  exclude ("*locales/**")
+  exclude ("utils/InstallAnywhere")
+  include ("$schemaDir/**/*")
+  include ("$utilsDir/**/*")
+  include ("$docDir/**/*")
+  include ("$examplesDir/**/*")
+  include ("getdown/**/*")
+  exclude (getdown_files_dir)
+  exclude (getdown_website_dir)
+
 }
 
index 2e6e38c..fe3133f 100644 (file)
@@ -25,6 +25,7 @@ docDir = doc
 sourceDir = src
 schemaDir = schemas
 classesDir = classes
+examplesDir = examples
 clover = false
 use_clover = false
 cloverClassesDir = clover-classes