//autoBuildTasks eclipseClasspath
} // eclipse
+/*
compileJava {
doFirst {
clean {
delete sourceSets.main.java.outputDir
}
+*/
-
-task jalviewjs_unzipFiles {
+task jalviewjsUnzipFiles {
def zipFiles = fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_libjs_dir).include("*.zip")
zipFiles += jalviewjs_utils_dir+"/"+jalviewjs_swingjs_zip
def eclipseBinary
def eclipseDropinsDir
def eclipsePluginsDir
-task jalviewjs_eclipsePaths {
+task jalviewjsEclipsePaths {
if (OperatingSystem.current().isMacOsX()) {
eclipseDropinsDir = jalviewjs_eclipse_root+"/Contents/Eclipse/dropins"
eclipsePluginsDir = jalviewjs_eclipse_root+"/Contents/Eclipse/plugins"
}
}
-task jalviewjs_eclipse_copy_dropins (type: Copy) {
- dependsOn jalviewjs_eclipsePaths
+task jalviewjsEclipseCopyDropins (type: Copy) {
+ dependsOn jalviewjsEclipsePaths
def inputFiles = fileTree(jalviewjs_utils_dir+"/"+jalviewjs_eclipse_dropins_dir)
def outputDir = eclipseDropinsDir
+
from inputFiles
into outputDir
+ def outputFiles = []
+ rename { filename ->
+ outputFiles += outputDir+"/"+filename
+ null
+ }
+ outputs.files outputFiles
inputs.files inputFiles
- //outputs.dir outputDir
}
-task jalviewjs_eclipse_copy_plugins (type: Copy) {
- dependsOn jalviewjs_eclipsePaths
+task jalviewjsEclipseCopyPlugins (type: Copy) {
+ dependsOn jalviewjsEclipsePaths
def inputFiles = fileTree(jalviewjs_utils_dir+"/"+jalviewjs_eclipse_plugins_dir)
def outputDir = eclipsePluginsDir
+
from inputFiles
into outputDir
- //inputs.files inputFiles
- //outputs.dir outputDir
+ def outputFiles = []
+ rename { filename ->
+ outputFiles += outputDir+"/"+filename
+ null
+ }
+ outputs.files outputFiles
+ inputs.files inputFiles
}
def tempEclipseWorkspace = ""
-task jalviewjs_setTempEclipseWorkspace {
+task jalviewjsSetTempEclipseWorkspace {
tempEclipseWorkspace = file(jalviewjs_eclipse_workspace)
if (!tempEclipseWorkspace.exists()) {
tempEclipseWorkspace = File.createTempDir()
+ print("ECLIPSE WORKSPACE: "+tempEclipseWorkspace.getPath())
//tempEclipseWorkspace.deleteOnExit()
}
}
-task jalviewjs_eclipse_setup {
- dependsOn jalviewjs_eclipse_copy_dropins
- dependsOn jalviewjs_eclipse_copy_plugins
- dependsOn jalviewjs_setTempEclipseWorkspace
+task jalviewjsEclipseSetup {
+ dependsOn jalviewjsEclipseCopyDropins
+ dependsOn jalviewjsEclipseCopyPlugins
+ dependsOn jalviewjsSetTempEclipseWorkspace
}
-task jalviewjs_createJ2sSettings(type: WriteProperties) {
+
+task jalviewjsCreateJ2sSettings(type: WriteProperties) {
outputFile (jalviewDir+"/"+jalviewjs_j2s_settings)
def props = project.properties.sort { it.key }
props.each { prop, val ->
- if (prop.startsWith("j2s.") && val != null) {
- property(prop,val)
- }
+ if (prop.startsWith("j2s.") && val != null) {
+ property(prop,val)
+ }
}
outputs.file(outputFile)
}
-task jalviewjs_copyResources (type: Copy) {
- from fileTree(dir: jalviewjs_resource_dir)
- into jalviewjs_site_dir+"/"+jalviewjs_j2s_subdir
+task jalviewjsCopyResources (type: Copy) {
+ def inputFiles = fileTree(dir: jalviewjs_resource_dir)
+ def outputDir = jalviewjs_site_dir+"/"+jalviewjs_j2s_subdir
+
+ from inputFiles
+ into outputDir
+ def outputFiles = []
+ rename { filename ->
+ outputFiles += outputDir+"/"+filename
+ null
+ }
+ outputs.files outputFiles
+ inputs.files inputFiles
}
-task jalviewjs_copySiteResources (type: Copy) {
- from fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_site_resource_dir)
- into jalviewjs_site_dir
+task jalviewjsCopySiteResources (type: Copy) {
+ def inputFiles = fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_site_resource_dir)
+ def outputDir = jalviewjs_site_dir
+
+ from inputFiles
+ into outputDir
+ def outputFiles = []
+ rename { filename ->
+ outputFiles += outputDir+"/"+filename
+ null
+ }
+ outputs.files outputFiles
+ inputs.files inputFiles
}
task cleanJalviewjsSite {
- //delete jalviewjs_site_dir
+ delete jalviewjs_site_dir
}
task jalviewjsProjectImport(type: Exec) {
// work out how to do this!
- //dependsOn eclipse
- dependsOn jalviewjs_eclipsePaths
- dependsOn jalviewjs_eclipse_setup
+ dependsOn eclipseProject
+ dependsOn eclipseClasspath
+ dependsOn eclipseJdt
+ dependsOn jalviewjsEclipsePaths
+ dependsOn jalviewjsEclipseSetup
executable(eclipseBinary)
args(["-nosplash", "--launcher.suppressErrors", "-application", "com.seeq.eclipse.importprojects.headlessimport", "-data", tempEclipseWorkspace.getPath(), "-import", jalviewDirAbsolutePath])
task jalviewjsTranspile(type: Exec) {
dependsOn jalviewjsProjectImport
- dependsOn jalviewjs_eclipsePaths
+ dependsOn jalviewjsEclipsePaths
executable(eclipseBinary)
args(["-nosplash", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-data", tempEclipseWorkspace, "-"+jalviewjs_eclipseBuildArg, eclipse_project_name ])
}
task jalviewjsBuildSite {
- dependsOn jalviewjs_unzipFiles
- dependsOn jalviewjs_copyResources
- dependsOn jalviewjs_copySiteResources
+ dependsOn jalviewjsUnzipFiles
+ dependsOn jalviewjsCopyResources
+ dependsOn jalviewjsCopySiteResources
dependsOn jalviewjsTranspile
}
task jalviewjs {
- dependsOn jalviewjs_createJ2sSettings
+ dependsOn jalviewjsCreateJ2sSettings
dependsOn jalviewjsBuildSite
}
#j11modDir = j11mod
#j11modules = com.sun.istack.runtime,com.sun.xml.bind,com.sun.xml.fastinfoset,com.sun.xml.streambuffer,com.sun.xml.txw2,com.sun.xml.ws.policy,java.activation,java.annotation,java.base,java.compiler,java.datatransfer,java.desktop,java.logging,java.management,java.management.rmi,java.naming,java.prefs,java.rmi,java.scripting,java.security.sasl,java.sql,java.xml,java.xml.bind,java.xml.soap,java.xml.ws,javax.jws,jdk.httpserver,jdk.jsobject,jdk.unsupported,jdk.xml.dom,org.jvnet.mimepull,org.jvnet.staxex,javax.servlet.api,java.ws.rs
-#eclipse_extra_jdt_prefs_file = .settings/org.eclipse.jdt.core.jalview.prefs
-
dev = false
jalviewjs_eclipse_root = /Users/bsoares/buildtools/eclipse/eclipse-jee-2019-06/Eclipse.app
jalviewjs_j2s_settings_file = dot_j2s
jalviewjs_j2s_settings = .j2s
jalviewjs_eclipse_workspace = /tmp/eclipse-workspace
-#jalviewjs_eclipseBuildArg = build
-jalviewjs_eclipseBuildArg = cleanBuild
+jalviewjs_eclipseBuildArg = build
+#jalviewjs_eclipseBuildArg = cleanBuild
j2s.compiler.status = enable