-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheclipse.gradle
50 lines (38 loc) · 1.29 KB
/
eclipse.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
apply plugin: 'eclipse'
apply plugin : 'java'
task cleanEclipseJdtUi(type: Delete) {
delete project.file('.settings');
}
task eclipseJdtUi(type: Copy) {
from rootProject.file('.prefs/org.eclipse.jdt.ui.prefs')
into project.file('.settings/')
}
task eclipseJdtPrepare(type: Copy) {
from rootProject.file('.prefs/org.eclipse.jdt.core.prefs')
into project.file('.settings/')
}
tasks["eclipseJdt"].dependsOn(eclipseJdtPrepare)
tasks["cleanEclipse"].dependsOn(cleanEclipseJdtUi)
tasks["eclipse"].dependsOn(eclipseJdtUi)
def projectName="${project.name}".split("/")
eclipse {
project {
buildCommand 'org.eclipse.dltk.core.scriptbuilder'
natures 'org.eclipse.wst.common.modulecore.ModuleCoreNature',
'eclipse.wst.common.project.facet.core.nature',
'org.springsource.ide.eclipse.gradle.core.nature',
'org.springframework.ide.eclipse.core.springnature',
'org.eclipse.wst.jsdt.core.jsNature',
'org.eclipse.jdt.core.javanature'
name=projectName.size()>1?projectName[1]:projectName[0]
}
ext.downloadSources = true
ext.downloadJavadoc = true
classpath {
containers = [
'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
]
downloadSources = true
downloadJavadoc = true
}
}