import org.gradle.plugins.ide.eclipse.model.*
import groovy.transform.ExternalizeMethods
-
plugins {
id 'java'
id 'application'
id 'eclipse'
id 'com.diffplug.gradle.oomph.ide' version '3.18.0'
+ id 'com.diffplug.gradle.equinoxlaunch' version '3.18.0'
+
+ id 'com.diffplug.gradle.p2.asmaven' version '3.18.0'
+}
+
+
+
+def eclipseDeps = [
+/*
+ // The dependencies we actually use
+ 'org.eclipse.jdt.core',
+ 'org.eclipse.text',
+
+ // Their transitives
+ 'org.eclipse.core.contenttype',
+ 'org.eclipse.core.jobs',
+ 'org.eclipse.core.runtime',
+ 'org.eclipse.core.resources',
+ 'org.eclipse.equinox.common',
+ 'org.eclipse.equinox.preferences',
+*/
+ 'org.eclipse.osgi'
+]
+
+p2AsMaven {
+ group 'p2', {
+ repoEclipse goomph_eclipse_version
+ eclipseDeps.each { p2.addIU(it) }
+ eclipseDeps.each { p2.addIU(it + '.source') }
+ }
}
+dependencies {
+ eclipseDeps.each { compile "p2:${it}:+" }
+}
+
+
+
+
+
repositories {
jcenter()
mavenCentral()
}
*/
+
+
+
+
+
+
+
+
+
+
+oomphIde {
+ repoEclipse goomph_eclipse_version
+ jdt {
+ /*
+ installedJre {
+ //markDefault = true
+ //executionEnvironments = [ eclipse.jdt.javaRuntimeName ]
+ }
+ */
+ //compilerComplianceLevel( JAVA_INTEGER_VERSION )
+ }
+ //repo 'http://download.eclipse.org/buildship/updates/e45/milestones/3.x/'
+ repo goomph_repo_buildship
+ feature goomph_feature_buildship
+}
+
+equinoxLaunch {
+ headlessAppSetup {
+ launchTask 'ideJalviewjsBuild', {
+ //it.args = ["-nosplash", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-data", tempEclipseWorkspace, "-"+jalviewjs_eclipseBuildArg, eclipse_project_name ]
+ it.args = ["-nosplash", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-"+jalviewjs_eclipseBuildArg, eclipse_project_name ]
+ }
+ }
+}
+
+task ideCopyDropins (type: Copy) {
+ dependsOn ideSetupP2
+
+ def inputFiles = fileTree(jalviewjs_utils_dir+"/"+jalviewjs_eclipse_dropins_dir)
+ def outputDir = oomphIde.ideDir + "/" + com.diffplug.gradle.FileMisc.macContentsEclipse() + "/dropins"
+
+ from inputFiles
+ into outputDir
+ def outputFiles = []
+ rename { filename ->
+ outputFiles += outputDir+"/"+filename
+ println("COPYING ${filename} to ${outputFiles}")
+ null
+ }
+ outputs.files outputFiles
+ inputs.files inputFiles
+
+}
+
+ide.dependsOn ideCopyDropins
+ideJalviewjsBuild.dependsOn ideSetupWorkspace
+ideJalviewjsBuild.dependsOn ideCopyDropins
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+def tempEclipseWorkspace = ""
+
+task jalviewjsSetTempEclipseWorkspace {
+ tempEclipseWorkspace = file(jalviewjs_eclipse_workspace)
+ if (!tempEclipseWorkspace.exists()) {
+ tempEclipseWorkspace = File.createTempDir()
+ tempEclipseWorkspace.deleteOnExit()
+ }
+ println("ECLIPSE WORKSPACE: "+tempEclipseWorkspace.getPath())
+}
+
task jalviewjsUnzipFiles {
def zipFiles = fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_libjs_dir).include("*.zip")
zipFiles += jalviewjs_utils_dir+"/"+jalviewjs_swingjs_zip
inputs.files inputFiles
}
-def tempEclipseWorkspace = ""
-
-task jalviewjsSetTempEclipseWorkspace {
- tempEclipseWorkspace = file(jalviewjs_eclipse_workspace)
- if (!tempEclipseWorkspace.exists()) {
- tempEclipseWorkspace = File.createTempDir()
- tempEclipseWorkspace.deleteOnExit()
- }
- println("ECLIPSE WORKSPACE: "+tempEclipseWorkspace.getPath())
-}
-
-oomphIde {
- repoEclipseLatest()
- jdt {
- }
- repo 'http://download.eclipse.org/buildship/updates/e45/milestones/3.x/'
- feature 'org.eclipse.buildship'
-}
-
task jalviewjsEclipseSetup {
dependsOn jalviewjsEclipseCopyDropins
dependsOn jalviewjsEclipseCopyPlugins