forked from geogebra/geogebra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
92 lines (75 loc) · 2.25 KB
/
build.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
project.description = 'GeoGebra'
apply from: 'gradle-scripts/dependencies.gradle'
subprojects {
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'idea'
eclipse.project {
natures 'org.springsource.ide.eclipse.gradle.core.nature'
}
// add auto formatter to every project
task eclipseJdtPrepare(type: Copy) {
description 'Copies Eclipse jdt.core preference file.'
from rootProject.file('eclipse/org.eclipse.jdt.core.prefs')
into project.file('.settings/')
outputs.upToDateWhen { false }
}
task eclipseJdtUi(type: Copy) {
description 'Copies Eclipse jdt.ui preference file.'
from rootProject.file('eclipse/org.eclipse.jdt.ui.prefs')
into project.file('.settings/')
outputs.upToDateWhen { false }
}
task cleanEclipseJdtUi(type: Delete) {
description 'Cleans Eclipse jdt.ui preference file.'
delete project.file('.settings/org.eclipse.jdt.ui.prefs')
}
tasks['eclipseJdt'].dependsOn(eclipseJdtPrepare)
tasks['cleanEclipse'].dependsOn(cleanEclipseJdtUi)
tasks['eclipse'].dependsOn(eclipseJdtPrepare, eclipseJdtUi, cleanEclipse)
afterEvaluate {
// forward command line properties to every test JVM
tasks.withType(Test.class).each { task ->
project.properties.each { prop, val ->
if (val instanceof String) {
task.systemProperty prop.trim(), val
}
}
}
}
}
wrapper {
gradleVersion = gradleVersionGGB
}
// eclipse related tasks
project(':editor-base') {
cleanEclipse.dependsOn('cleanJavacc')
eclipseClasspath.dependsOn('compileJavacc')
eclipse.project {
natures 'sf.eclipse.javacc.javaccnature'
}
}
project(':common') {
cleanEclipse.dependsOn('cleanJavacc')
eclipseClasspath.dependsOn('compileJavacc')
eclipse.project {
natures 'sf.eclipse.javacc.javaccnature'
}
}
project(':web') {
// exclude from the eclipse classpath the java files in the resources dir
eclipse.classpath.file {
whenMerged { classpath ->
classpath.entries.find { entry -> entry.kind == 'src' && entry.path == 'src/main/resources' }.excludes = ['**/*.java']
}
}
}
// https://gist.github.com/mashimom/891a55878eda510d316e
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('tag', 'example:X')
}
}
}