+*/
+
+// this version (type: Copy) will delete anything in the eclipse dropins folder that isn't in fromDropinsDir
+task jalviewjsEclipseCopyDropins(type: Copy) {
+ dependsOn jalviewjsEclipsePaths
+
+ from utilsDropinsDir
+ into eclipseDropinsDir
+}
+
+// this eclipse -clean doesn't actually work
+task jalviewjsCleanEclipse(type: Exec) {
+ dependsOn eclipseSetup
+ dependsOn jalviewjsEclipsePaths
+ dependsOn jalviewjsEclipseCopyDropins
+
+ executable(eclipseBinary)
+ args(["-nosplash", "--launcher.suppressErrors", "-data", eclipseWorkspace.getPath(), "-clean", "-console", "-consoleLog"])
+ if (eclipseDebug) {
+ args += "-debug"
+ }
+ args += "-l"
+
+ def inputString = """exit
+y
+"""
+ def inputByteStream = new ByteArrayInputStream(inputString.getBytes())
+ standardInput = inputByteStream
+
+ doFirst {
+ println("CLEAN ECLIPSE_DEBUG=${eclipseDebug}")
+ }
+}
+/* not really working yet
+jalviewjsEclipseCopyDropins.finalizedBy jalviewjsCleanEclipse
+*/
+
+task jalviewjsUnzipFiles {
+ dependsOn jalviewjsSitePath
+
+ def zipFiles = fileTree(dir: "${jalviewjs_utils_dir}/${jalviewjs_libjs_dir}", include: "*.zip")
+ zipFiles += "${jalviewjs_utils_dir}/${jalviewjs_swingjs_zip}${eclipseVersionSuffix}"
+
+ doLast {
+ zipFiles.each { file_zip ->
+ copy {
+ from zipTree(file_zip)
+ into jalviewjsSiteDir
+ }
+ }
+ }
+
+ inputs.files zipFiles
+ outputs.dir jalviewjsSiteDir
+}