xtext-core/org.eclipse.xtext.tests/build.gradle
Christian Dietrich b640cb17ac Fix build to work with Xtext plugin 3.0.0
The new plugin adds its output directories to the original java.srcDirs
(instead of waiting until later with `afterEvaluate`). If we overwrite
that collection with our own, we need to add the Xtend output dir ourselves.
2021-10-21 16:56:36 +02:00

44 lines
1.5 KiB
Groovy

apply from: "${rootDir}/gradle/mwe2-workflows.gradle"
dependencies {
api project(':org.eclipse.xtext.testing')
api project(':org.eclipse.xtext.xtext.generator')
api project(':org.eclipse.xtext.xtext.wizard')
api project(':org.eclipse.xtext.testlanguages')
mwe2Implementation project(':org.eclipse.xtext.testlanguages')
api 'junit:junit'
api 'org.eclipse.emf:org.eclipse.emf.common'
api '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
testImplementation sourceSets.mwe2.output
testImplementation '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', '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'
}
test {
exclude 'org.eclipse.xtext.serializer.contextFinderTest.NestedTypeRecursiveTest.class'
exclude '**/*Suite.class'
}