-
Notifications
You must be signed in to change notification settings - Fork 466
/
Copy pathbuild.gradle
112 lines (98 loc) · 4.55 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
ext {
developers = [
fvgh: [ name: 'Frank Vennemeyer', email: '[email protected]' ],
]
p2Repository = "http://download.eclipse.org/webtools/repository/${VER_ECLIPSE_WTP}"
p2Dependencies = [
// XML/HTML Formatter - Dependencies
'org.eclipse.wst.xml.core':'+', // DefaultXMLPartitionFormatter and XMLAssociationProvider
'org.eclipse.wst.sse.core':'+', // Structure models
'org.eclipse.wst.common.uriresolver':'+', // URI resolver for model queries
'org.eclipse.wst.dtd.core':'+', // Support DTD extensions
// XML Formatter - Dependencies
'org.eclipse.wst.xsd.core':'+', // Support XSD extensions
// JS Formatter - Dependencies
'org.eclipse.wst.jsdt.core':'+', // DefaultCodeFormatter and related
'org.eclipse.wst.jsdt.ui':'+', // Functionality to format comments
// JSON Formatter - Dependencies
'org.eclipse.wst.json.core':'+', // FormatProcessorJSON and related
'org.eclipse.json':'+', // Provides JSON node interfaces
// CSS Formatter - Dependencies
'org.eclipse.wst.css.core':'+', // FormatProcessorCSS and related
// HTML Formatter - Dependencies
'org.eclipse.wst.html.core':'+', // HTMLFormatProcessorImpl and related
]
jarInclude = [
'**/*.class', // Take all classes
'**/*.properties', // Text resources (for messages, etc)
'**/*.rsc', // JSDT requires gramar files
'**/*.xml', // Plugin XML and other resources
'*.html', // License information about the included JARs,
'META-INF/**' // Plugin manifest and addtional information
]
fatJarResourcesMap = [
'org.eclipse.wst.common.uriresolver': 'org.eclipse.wst.common.uriresolver.internal.provisional',
'org.eclipse.wst.css.core': 'org.eclipse.wst.css.core.internal',
'org.eclipse.wst.dtd.core': 'org.eclipse.wst.dtd.core.internal',
'org.eclipse.wst.html.core': 'org.eclipse.wst.html.core.internal',
'org.eclipse.wst.sse.core': 'org.eclipse.wst.sse.core.internal.encoding.util',
'org.eclipse.wst.xml.core': 'org.eclipse.wst.xml.core.internal',
'org.eclipse.wst.xsd.core': 'org.eclipse.wst.xsd.core.internal'
]
}
apply from: rootProject.file('../gradle/p2-fat-jar-setup.gradle')
apply from: rootProject.file('../gradle/java-publish.gradle')
dependencies {
compile "com.diffplug.spotless:spotless-eclipse-base:${VER_SPOTLESS_ECLISPE_BASE}"
// Required by most WPT formatters
compile "com.ibm.icu:icu4j:${VER_IBM_ICU}"
// The XSD/DTD and other models are defined with EMF.
compile "org.eclipse.emf:org.eclipse.emf.common:${VER_ECLISPE_EMF}"
compile "org.eclipse.emf:org.eclipse.emf.ecore:${VER_ECLISPE_EMF}"
// Some WPT plugins requires OSGI bundle interfaces (but not effectively used)
compile "org.eclipse.platform:org.eclipse.osgi.services:${VER_ECLISPE_PLATFORM}"
// Provides document data structure and file buffers for formatters
compile "org.eclipse.platform:org.eclipse.core.filebuffers:${VER_ECLISPE_PLATFORM}"
// Provides text partitioners for formatters
compile ("org.eclipse.platform:org.eclipse.jface.text:${VER_ECLISPE_JFACE}") {
exclude group: 'org.eclipse.platform', module: 'org.eclipse.swt'
}
// Some WPT plugins use the EFS for storing temporary worspace data
compile "org.eclipse.platform:org.eclipse.core.filesystem:${VER_ECLISPE_EFS}"
// Required by org.eclipse.wst.xsd.core
compile "org.eclipse.xsd:org.eclipse.xsd:${VER_ECLISPE_XSD}"
}
//////////
// Test //
//////////
sourceSets {
// Use JAR file with all resources for Eclipse-WTP integration-tests
test.runtimeClasspath = jar.outputs.files + sourceSets.test.output + sourceSets.test.compileClasspath
}
/*
* All test classes need to run separately since they all instatiate different setups of the
* Eclipse framework.
*/
test {
//Skip default tests, which would run every test case.
exclude '**'
}
//Instead make a separate test task per case
def testLocation = 'src/test/java'
fileTree(dir: testLocation).include('**/*Test.java').each { file ->
def testFile = file.getName().replace(".java", "")
def filePath = file.getAbsolutePath().replace(".java", "**") //Don't ask me why the task is not happy when it gets no asterisk
filePath = filePath.substring(filePath.lastIndexOf(testLocation) + testLocation.length() + 1)
task "${testFile}"(type: Test) {
group = LifecycleBasePlugin.VERIFICATION_GROUP
description = "Runs ${testFile} integration test."
include "${filePath}"
reports {
html.destination = new File("$buildDir/reports/${testFile}")
junitXml.destination = new File("$buildDir/${testFile}")
}
//classpath = jar.outputs.files + sourceSets.test.output + sourceSets.test.compileClasspath
mustRunAfter tasks.jar
}
test.dependsOn "${testFile}"
}