mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
68 lines
2 KiB
Groovy
68 lines
2 KiB
Groovy
apply from: "${rootDir}/gradle/mwe2-workflows.gradle"
|
|
|
|
dependencies {
|
|
compile project(':org.eclipse.xtext.testing')
|
|
compile project(':org.eclipse.xtext.xtext.generator')
|
|
compile project(':org.eclipse.xtext.xtext.wizard')
|
|
compile project(':org.eclipse.xtext.testlanguages')
|
|
mwe2Compile project(':org.eclipse.xtext.testlanguages')
|
|
compile 'junit:junit'
|
|
compile 'org.eclipse.emf:org.eclipse.emf.common'
|
|
compile 'org.eclipse.emf:org.eclipse.emf.ecore.xmi'
|
|
optional files('lib/simple.jar')
|
|
// The MWE2 workflow depends on emf-gen, so we have to include it in the test dependencies
|
|
testCompile sourceSets.mwe2.output
|
|
testCompile 'args4j:args4j'
|
|
// optional for the utilities but mandatory to run the tests
|
|
testImplementation 'junit:junit'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-engine'
|
|
testImplementation 'org.junit.platform:junit-platform-suite-api'
|
|
testImplementation 'org.junit.platform:junit-platform-runner'
|
|
}
|
|
|
|
sourceSets.test {
|
|
java.srcDirs = ['src', 'src-gen', 'suites']
|
|
if (findProperty('compileXtend') != 'true') {
|
|
java.srcDir 'xtend-gen'
|
|
}
|
|
}
|
|
|
|
sourceSets.mwe2 {
|
|
java.srcDirs = ['generator/src', 'emf-gen']
|
|
runtimeClasspath += processTestResources.outputs.files
|
|
}
|
|
jar.from sourceSets.mwe2.output
|
|
sourcesJar.from sourceSets.mwe2.allSource
|
|
|
|
task generateTestLanguages(type: XtextGeneratorTask) {
|
|
workflow = file('src/org/eclipse/xtext/GenerateAllTestLanguages.mwe2')
|
|
outputs.dir 'src-gen'
|
|
dependsOn 'processTestResources'
|
|
}
|
|
|
|
tasks.getByName('compileTestJava') {
|
|
mustRunAfter 'generateTestLanguages'
|
|
}
|
|
|
|
tasks.getByName('compileJava') {
|
|
mustRunAfter 'generateTestLanguages'
|
|
}
|
|
|
|
if (tasks.findByName('generateTestXtext')) {
|
|
tasks.getByName('generateTestXtext') {
|
|
mustRunAfter 'generateTestLanguages'
|
|
}
|
|
}
|
|
|
|
if (tasks.findByName('generateXtext')) {
|
|
tasks.getByName('generateXtext') {
|
|
mustRunAfter 'generateTestLanguages'
|
|
}
|
|
}
|
|
|
|
|
|
test {
|
|
exclude 'org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest.class'
|
|
exclude '**/*Suite.class'
|
|
}
|