import org.apache.tools.ant.filters.ReplaceTokens import org.gradle.internal.os.OperatingSystem import org.gradle.plugins.ide.eclipse.model.* import groovy.transform.ExternalizeMethods //import org.eclipse.osgi.* import com.diffplug.gradle.GoomphCacheLocations buildscript { repositories { /* mavenCentral() jcenter() */ } } plugins { id 'java' id 'application' id 'eclipse' id 'com.diffplug.gradle.oomph.ide' version '3.18.1' id 'com.diffplug.gradle.equinoxlaunch' version '3.18.1' id 'com.diffplug.gradle.eclipse.mavencentral' version '3.18.1' } dependencies { //compile group: 'org.osgi', name: 'org.osgi.service.component', version: '1.4.0' /* source.addMaven('org.eclipse.platform:org.eclipse.osgi:3.14.0') source.addMaven('org.eclipse.platform:org.eclipse.equinox.common:3.10.400') source.addMaven('org.eclipse.platform:org.eclipse.core.jobs:3.10.400') source.addMaven('org.eclipse.platform:org.eclipse.update.configurator:3.4.300') source.addMaven('org.eclipse.platform:org.eclipse.core.runtime:3.16.0') source.addMaven('org.eclipse.platform:org.eclipse.equinox.ds:1.6.0') source.addMaven('javax.inject:com.springsource.javax.inject:1.0.0') */ //compile 'com.ibm.icu:com.ibm.icu:4.4.2' } def jalviewDirAbsolutePath = file(jalviewDir).getAbsolutePath() repositories { jcenter() mavenCentral() maven { url "http://maven.icm.edu.pl/artifactory/repo/" } maven { url "http://maven.geomajas.org/" } maven { url "https://repo.spring.io/plugins-release/" } maven { url "${jalviewDirAbsolutePath}/${m2RepoDir}" } mavenLocal() flatDir { dirs gradlePluginsDir } } /* p2AsMaven { def requiredBundles = [ 'org.eclipse.core.commands', 'org.eclipse.core.resources', 'org.eclipse.core.runtime', 'org.eclipse.ui', 'org.eclipse.ui.ide', 'org.eclipse.jface', 'org.eclipse.swt', //"org.eclipse.swt.${com.diffplug.common.swt.os.SwtPlatform.getNative()}", 'org.eclipse.equinox.registry', 'org.eclipse.equinox.common', 'org.eclipse.osgi', 'org.eclipse.core.jobs', 'org.eclipse.ui.workbench', 'org.eclipse.jdt.core', 'org.eclipse.jdt.ui', 'org.eclipse.text' ] group 'eclipse-deps', { repoEclipse '4.12.0' // reduce the number of plugins downloaded slicingOption 'latestVersionOnly', 'true' requiredBundles.each { iu "${it}" } append true } } */ /* eclipseMavenCentral { release '4.13.0', { compile 'org.eclipse.osgi' compile 'org.eclipse.equinox.common' compile 'org.eclipse.update.configurator' compile 'org.eclipse.core.runtime' compile 'org.eclipse.core.jobs' compile 'org.eclipse.equinox.ds' compile 'org.eclipse.osgi.services' useNativesForRunningPlatform() } } */ mainClassName = launcherClass def classes = "$jalviewDir/$classesDir" // configure classpath/args for j8/j11 compilation def libDir def libDistDir def compile_source_compatibility def compile_target_compatibility ext { buildProperties = jalviewDir + "/" + classesDir +"/" + buildPropertiesFile gitHash = "" gitBranch = "" jalviewjsServer = "" } def JAVA_INTEGER_VERSION //def additional_compiler_args = [] // this property is for the Java library used in eclipse def eclipse_java_runtime_name if (JAVA_VERSION.equals("1.8")) { JAVA_INTEGER_VERSION = "8" //libDir = j8libDir libDir = j11libDir libDistDir = j8libDir compile_source_compatibility = 1.8 compile_target_compatibility = 1.8 eclipse_java_runtime_name = "JavaSE-1.8" } else if (JAVA_VERSION.equals("11")) { JAVA_INTEGER_VERSION = "11" libDir = j11libDir libDistDir = j11libDir compile_source_compatibility = 11 compile_target_compatibility = 11 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 libDistDir = j11libDir compile_source_compatibility = JAVA_VERSION compile_target_compatibility = JAVA_VERSION 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") } sourceSets { main { java { srcDirs "$jalviewDir/$sourceDir" outputDir = file("$classes") } resources { srcDirs "$jalviewDir/$resourceDir" } compileClasspath = files(sourceSets.main.java.outputDir) compileClasspath += fileTree(dir: "$jalviewDir/$libDir", include: ["*.jar"]) runtimeClasspath = compileClasspath } } eclipse { project { name = eclipse_project_name natures 'org.eclipse.jdt.core.javanature', 'org.eclipse.buildship.core.gradleprojectnature' buildCommand 'org.eclipse.jdt.core.javabuilder' buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder' } classpath { //defaultOutputDir = sourceSets.main.java.outputDir def removeThese = [] configurations.each{ if (it.isCanBeResolved()) { removeThese += it } } minusConfigurations += removeThese plusConfigurations = [ ] file { whenMerged { cp -> def removeTheseToo = [] HashMap addedSrcPath = new HashMap<>(); cp.entries.each { entry -> if (entry.kind == 'src') { if (addedSrcPath.getAt(entry.path) || !(entry.path == "src" || entry.path == "test")) { removeTheseToo += entry } else { addedSrcPath.putAt(entry.path, true) } } } cp.entries.removeAll(removeTheseToo) if (file(eclipse_bin_dir+"/main").isDirectory()) { cp.entries += new Output(eclipse_bin_dir+"/main") } if (file(helpParentDir).isDirectory()) { cp.entries += new Library(fileReference(helpParentDir)) } if (file(resourceDir).isDirectory()) { cp.entries += new Library(fileReference(resourceDir)) } HashMap addedLibPath = new HashMap<>(); // changing from sourcesets.main.classpath to specific Java version lib //sourceSets.main.compileClasspath.each{ fileTree("$jalviewDir/$libDistDir").include("**/*.jar").include("*.jar").each { //don't want to add outputDir as eclipse is using its own output dir in bin/main if (it.isDirectory() || ! it.exists()) { // don't add dirs to classpath return } def itPath = it.toString() if (itPath.startsWith(jalviewDirAbsolutePath+"/")) { itPath = itPath.substring(jalviewDirAbsolutePath.length()+1) } if (addedLibPath.get(itPath)) { //println("Not adding duplicate entry "+itPath) } else { //println("Adding entry "+itPath) cp.entries += new Library(fileReference(itPath)) addedLibPath.put(itPath, true) } } } // whenMerged } // file containers 'org.eclipse.buildship.core.gradleclasspathcontainer' } // classpath jdt { // for the IDE, use java 11 compatibility sourceCompatibility = compile_source_compatibility targetCompatibility = compile_target_compatibility javaRuntimeName = eclipse_java_runtime_name /* file { withProperties { props -> def jalview_prefs = new Properties() def ins = new FileInputStream(jalviewDirAbsolutePath+"/"+eclipse_extra_jdt_prefs_file) jalview_prefs.load(ins) ins.close() jalview_prefs.forEach { t, v -> if (props.getAt(t) == null) { props.putAt(t, v) } } } } */ } // jdt //synchronizationTasks eclipseClasspath //autoBuildTasks eclipseClasspath } // eclipse /* compileJava { doFirst { sourceCompatibility = compile_source_compatibility targetCompatibility = compile_target_compatibility //options.compilerArgs = additional_compiler_args print ("Setting target compatibility to "+targetCompatibility+"\n") } } clean { delete sourceSets.main.java.outputDir } */ def useIde = useGoomph.equals("true") def eclipseWorkspace task jalviewjsSetEclipseWorkspace { def eclipseWsDir = useIde?goomph_workspace:jalviewjs_eclipse_workspace eclipseWorkspace = file(eclipseWsDir) if (!eclipseWorkspace.exists()) { eclipseWorkspace = file("${buildDir}/tmp/eclipse-workspace") //eclipseWorkspace.deleteOnExit() } else if (useIde) { GoomphCacheLocations.override_workspaces = file(eclipseWorkspace.getAbsolutePath()) eclipseWorkspace = oomphIde.workspaceRegistry.workspaceDir(project, file(oomphIde.ideDir)) } println("ECLIPSE WORKSPACE: "+eclipseWorkspace.getPath()) } oomphIde { repoEclipse goomph_eclipse_version jdt { /* installedJre { //markDefault = true //executionEnvironments = [ eclipse.jdt.javaRuntimeName ] } */ //compilerComplianceLevel( JAVA_INTEGER_VERSION ) } repo "https://download.eclipse.org/releases/${goomph_eclipse_version_name}/" feature goomph_eclipse_jee_feature, goomph_eclipse_jee_version //iu 'org.eclipse.osgi' thirdParty { buildship { repo goomph_repo_buildship feature goomph_feature_buildship } } // CLI ARGS HERE! } equinoxLaunch { ideJalviewjsBuildSetup { source.addThisProject() //source.addMaven('com.ibm.icu:icu4j:65.1') source.addMaven('org.eclipse.birt.runtime:com.ibm.icu:56.1.0.v201601250100') source.addMaven('javax.inject:com.springsource.javax.inject:1.0.0') //source.addMaven('org.apache.ant:ant:1.7.0') source.addMaven('org.apache.ant:org.apache.ant:1.6.5') source.addMaven('org.apache.felix:org.apache.felix.scr:2.1.16') source.addMaven('org.osgi:org.osgi.framework:1.9.0') source.addMaven('org.osgi:org.osgi.service.component:1.4.0') source.addMaven('org.osgi:org.osgi.util.promise:1.1.1') source.addMaven('org.osgi:org.osgi.util.function:1.1.0') source.addMaven('org.eclipse.jdt:org.eclipse.jdt.apt.core:3.6.500') //source.addMaven('org.eclipse.jdt:org.eclipse.jdt.apt.ui:3.6.300') //source.addMaven('org.eclipse.jdt:org.eclipse.jdt.compiler.apt:1.3.700') source.addMaven('org.eclipse.jdt:org.eclipse.jdt.core:3.19.0') source.addMaven('org.eclipse.platform:org.eclipse.ant.core:3.5.500') source.addMaven('org.eclipse.platform:org.eclipse.compare.core:3.6.600') source.addMaven('org.eclipse.platform:org.eclipse.core.commands:3.9.500') source.addMaven('org.eclipse.platform:org.eclipse.core.contenttype:3.7.400') source.addMaven('org.eclipse.platform:org.eclipse.core.jobs:3.10.500') source.addMaven('org.eclipse.platform:org.eclipse.core.expressions:3.6.500') source.addMaven('org.eclipse.platform:org.eclipse.core.filesystem:1.7.500') source.addMaven('org.eclipse.platform:org.eclipse.core.resources:3.13.500') source.addMaven('org.eclipse.platform:org.eclipse.core.runtime:3.16.0') source.addMaven('org.eclipse.platform:org.eclipse.core.variables:3.4.600') source.addMaven('org.eclipse.platform:org.eclipse.equinox.common:3.10.500') source.addMaven('org.eclipse.platform:org.eclipse.equinox.ds:1.6.0') source.addMaven('org.eclipse.platform:org.eclipse.equinox.app:1.4.300') source.addMaven('org.eclipse.platform:org.eclipse.equinox.registry:3.8.500') source.addMaven('org.eclipse.platform:org.eclipse.equinox.preferences:3.7.500') source.addMaven('org.eclipse.platform:org.eclipse.osgi:3.14.0') source.addMaven('org.eclipse.platform:org.eclipse.team.core:3.8.700') source.addMaven('org.eclipse.platform:org.eclipse.text:3.9.0') source.addMaven('org.eclipse.platform:org.eclipse.update.configurator:3.3.400') /* source.addMaven('org.eclipse.platform:org.eclipse.:3.') source.addMaven('org.eclipse.platform:org.eclipse.:3.') source.addMaven('org.eclipse.platform:org.eclipse.:3.') source.addMaven('org.eclipse.platform:org.eclipse.:3.') source.addMaven('org.eclipse.platform:org.eclipse.:3.') */ launchTask 'ideJalviewjsBuild', { //it.args = ["-nosplash", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-data", eclipseWorkspace, "-"+jalviewjs_eclipseBuildArg, eclipse_project_name ] //it.args = ["-nosplash", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-"+jalviewjs_eclipseBuildArg, eclipse_project_name ] it.args = ["-consoleLog", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-"+jalviewjs_eclipseBuildArg, eclipse_project_name ] //it.vmArgs = ['-Dosgi.bundles=org.eclipse.core.jobs@2:start,org.eclipse.equinox.common@3:start,org.eclipse.core.runtime@2:start'] //it.vmArgs = ['-Dequinox.use.ds=false'] } } } /* 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 } */ ideSetupWorkspace.dependsOn jalviewjsSetEclipseWorkspace ideSetupWorkspace.outputs.upToDateWhen {file(eclipseWorkspace).exists()} task ideSetup { dependsOn ideSetupP2 dependsOn ideSetupWorkspace } def jalviewjsBuildDir def jalviewjsSiteDir task jalviewjsSitePath { if (jalviewjs_site_dir.startsWith("/")) { jalviewjsSiteDir = jalviewjs_site_dir } else { def relativeBuildDir = file(jalviewDirAbsolutePath).toPath().relativize(buildDir.toPath()) jalviewjsBuildDir = "${relativeBuildDir}/jalviewjs" jalviewjsSiteDir = jalviewjsBuildDir + "/" + jalviewjs_site_dir } } task jalviewjsUnzipFiles { dependsOn jalviewjsSitePath def zipFiles = fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_libjs_dir).include("*.zip") zipFiles += jalviewjs_utils_dir+"/"+jalviewjs_swingjs_zip doLast { zipFiles.each { file_zip -> copy { from zipTree(file_zip) into jalviewjsSiteDir } } } inputs.files zipFiles outputs.dir jalviewjsSiteDir } def eclipseDropinsDir def eclipseBinary task jalviewjsEclipsePaths { def eclipseRoot if (useIde) { eclipseRoot = oomphIde.ideDir eclipseDropinsDir = eclipseRoot+"/"+com.diffplug.gradle.FileMisc.macContentsEclipse()+"/dropins" eclipseBinary = eclipseRoot+"/"+com.diffplug.common.swt.os.OS.getNative().winMacLinux("", "Contents/MacOS", "")+"/eclipse" } else { eclipseRoot = jalviewjs_eclipse_root if (eclipseRoot.startsWith("~")) { eclipseRoot = System.getProperty("user.home") + eclipseRoot.substring(1) } if (OperatingSystem.current().isMacOsX()) { eclipseRoot += "/Eclipse.app" eclipseDropinsDir = eclipseRoot+"/Contents/Eclipse/dropins" eclipseBinary = eclipseRoot+"/Contents/MacOS/eclipse" } else if (OperatingSystem.current().isWindows()) { // check these paths!! eclipseDropinsDir = eclipseRoot+"/dropins" eclipseBinary = eclipseRoot+"/eclipse" } else { // linux or unix eclipseDropinsDir = eclipseRoot+"/dropins" eclipseBinary = eclipseRoot+"/eclipse" } } //println("ECLIPSE_ROOT=${eclipseRoot}") //println("ECLIPSE_BINARY=${eclipseBinary}") } //task jalviewjsEclipseCopyDropins (type: Copy) { task jalviewjsEclipseCopyDropins { dependsOn jalviewjsEclipsePaths def inputFiles = fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_eclipse_dropins_dir, include: "*.jar") def outputDir = eclipseDropinsDir inputs.files inputFiles inputFiles.each { file -> outputs.file(outputDir+"/"+file.name) } doLast { def outputFiles = [] inputFiles.each { file -> copy { from file into outputDir } } } } task jalviewjsEclipseSetup { dependsOn jalviewjsEclipseCopyDropins dependsOn jalviewjsSetEclipseWorkspace } task jalviewjsCreateJ2sSettings(type: WriteProperties) { dependsOn jalviewjsSitePath outputFile (jalviewDir+"/"+jalviewjs_j2s_settings) def props = project.properties.sort { it.key } def siteDirProperty = "j2s.site.directory" def setSiteDir = false props.each { prop, val -> if (prop.startsWith("j2s.") && val != null) { if (prop == siteDirProperty) { if (!(val.startsWith("/") || val.startsWith("file://") )) { val = jalviewjsSiteDir+"/"+val } setSiteDir = true } property(prop,val) } if (!setSiteDir) { property(siteDirProperty,"${jalviewjsSiteDir}") } } outputs.file(outputFile) } task jalviewjsCopyResources (type: Copy) { dependsOn jalviewjsSitePath def inputFiles = fileTree(dir: jalviewjs_resource_dir) def outputDir = jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir from inputFiles into outputDir def outputFiles = [] rename { filename -> outputFiles += outputDir+"/"+filename null } outputs.files outputFiles inputs.files inputFiles } task jalviewjsCopySiteResources (type: Copy) { dependsOn jalviewjsSitePath def inputFiles = fileTree(dir: jalviewjs_utils_dir+"/"+jalviewjs_site_resource_dir) def outputDir = jalviewjsSiteDir from inputFiles into outputDir def outputFiles = [] rename { filename -> outputFiles += outputDir+"/"+filename null } outputs.files outputFiles inputs.files inputFiles } task cleanJalviewjs { dependsOn jalviewjsSitePath /* delete jalviewDir+"/"+jalviewjsSiteDir delete jalviewDir+"/"+eclipse_bin_dir delete file(eclipseWorkspace.getAbsolutePath()+"/.metadata") delete jalviewDir+"/"+jalviewjs_j2s_settings */ } task jalviewjsProjectImport(type: Exec) { // work out how to do this! dependsOn eclipseProject dependsOn eclipseClasspath dependsOn eclipseJdt dependsOn jalviewjsEclipsePaths dependsOn jalviewjsEclipseSetup executable(eclipseBinary) args(["-nosplash", "--launcher.suppressErrors", "-application", "com.seeq.eclipse.importprojects.headlessimport", "-data", eclipseWorkspace.getPath(), "-import", jalviewDirAbsolutePath]) def projdir = eclipseWorkspace.getPath()+"/.metadata/.plugins/org.eclipse.core.resources/.projects/jalview/org.eclipse.jdt.core" inputs.file(jalviewDir+"/.project") outputs.dir(projdir) outputs.upToDateWhen { file(projdir).exists() } } task jalviewjsTranspile(type: Exec) { dependsOn jalviewjsCreateJ2sSettings dependsOn jalviewjsProjectImport dependsOn jalviewjsEclipsePaths executable(eclipseBinary) args(["-nosplash", "--launcher.suppressErrors", "-application", "org.eclipse.jdt.apt.core.aptBuild", "-data", eclipseWorkspace, "-"+jalviewjs_eclipseBuildArg, eclipse_project_name ]) def stdout def stderr doFirst { stdout = new ByteArrayOutputStream() stderr = new ByteArrayOutputStream() standardOutput = new org.apache.tools.ant.util.TeeOutputStream(new FileOutputStream("${jalviewjsBuildDir}/${jalviewjs_j2s_stdout}"), stdout); errorOutput = new org.apache.tools.ant.util.TeeOutputStream(new FileOutputStream("${jalviewjsBuildDir}/${jalviewjs_j2s_stderr}"), stderr); } doLast { if (stdout.toString().contains("Error processing ")) { // j2s did not complete transpile throw new GradleException("Error during transpilation:\n${stderr}\nSee eclipse transpile log files '${jalviewjsBuildDir}/${jalviewjs_j2s_stdout}' and '${jalviewjsBuildDir}/${jalviewjs_j2s_stderr}'\n") } } inputs.dir(sourceDir) outputs.dir(eclipse_bin_dir+"/main") outputs.files( fileTree( dir: jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir, includes: [ "**/*.js" ], excludes: [ //jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir+"/intervalstore/**", //jalviewjsSiteDir+"/"+jalviewjs_j2s_subdir+"/org/json/**", "intervalstore/**", "org/json/**", ] ).files ) outputs.file(jalviewjsSiteDir+jalviewjs_server_resource) } jalviewjsUnzipFiles.mustRunAfter jalviewjsTranspile jalviewjsTranspile.mustRunAfter jalviewjsCopyResources jalviewjsTranspile.mustRunAfter jalviewjsCopySiteResources task jalviewjsBuildSite { dependsOn jalviewjsSitePath dependsOn jalviewjsUnzipFiles dependsOn jalviewjsCopyResources dependsOn jalviewjsCopySiteResources dependsOn jalviewjsTranspile } task jalviewjsSiteTar(type: Tar) { dependsOn jalviewjsBuildSite def outputFilename = "jalviewjs-site-${JALVIEW_VERSION}.tar.gz" try { archiveFileName = outputFilename } catch (Exception e) { archiveName = outputFilename } compression Compression.GZIP from jalviewjsSiteDir into jalviewjs_site_dir // this is inside the tar file inputs.dir(jalviewjsSiteDir) } def jalviewjsServer = null task jalviewjsServerStart { dependsOn jalviewjsSitePath doLast { if (jalviewjsServer != null) { println("SERVER ALREADY RUNNING. Go to "+jalviewjsServer.getResourceUrl(jalviewjs_server_resource)+" . Run gradle jalviewjsServerStop to stop.") } else { SimpleHttpFileServerFactory factory = new SimpleHttpFileServerFactory() def port = Integer.valueOf(jalviewjs_server_port) def start = port def running = false while(port < start+1000 && !running) { try { def doc_root = new File(jalviewDirAbsolutePath +"/"+ jalviewjsSiteDir) jalviewjsServer = factory.start(doc_root, port) running = true println("SERVER STARTED with document root ${doc_root}.\nGo to "+jalviewjsServer.getResourceUrl(jalviewjs_server_resource)+" . Run gradle --stop to stop (kills all gradle daemons).") //println("Ctrl-c to stop.");java.lang.Thread.sleep(Integer.valueOf(jalviewjs_server_wait)*1000); } catch (Exception e) { port++; } } } } } /* server persists in gradle daemon but reference is not accessible across builds task jalviewjsServerStop { doLast { if (jalviewjsServer != null) { println("SERVER ON PORT "+jalviewjsServer.getPort()+" STOPPING. Run gradle jalviewjsServerStart to start again.") jalviewjsServer.stop() } else { println("SERVER NOT RUNNING. Run gradle jalviewjsServerStart to start.") } } } */ task ideBuildSite { dependsOn jalviewjsSitePath dependsOn jalviewjsUnzipFiles dependsOn jalviewjsCopyResources dependsOn jalviewjsCopySiteResources dependsOn ideSetup dependsOn ide } task jalviewjs { dependsOn jalviewjsBuildSite } project.afterEvaluate { tasks.findByName('ideJalviewjsBuild').dependsOn eclipseProject tasks.findByName('ideJalviewjsBuild').dependsOn eclipseClasspath tasks.findByName('ideJalviewjsBuild').dependsOn eclipseJdt //tasks.findByName('ideJalviewjsBuild').dependsOn ideSetup tasks.findByName('ide').dependsOn eclipseProject tasks.findByName('ide').dependsOn eclipseClasspath tasks.findByName('ide').dependsOn eclipseJdt }