mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
37 lines
1.1 KiB
Groovy
37 lines
1.1 KiB
Groovy
/*
|
|
* Configuration of source sets, dependencies, and tasks for running MWE2 workflows.
|
|
*/
|
|
|
|
sourceSets {
|
|
mwe2 {}
|
|
}
|
|
|
|
eclipse.classpath.plusConfigurations += [configurations.mwe2Runtime]
|
|
|
|
dependencies {
|
|
if (!name.endsWith('bootstrap')) {
|
|
mwe2Compile project(':org.eclipse.xtext.xtext.generator')
|
|
}
|
|
mwe2Runtime 'org.eclipse.emf:org.eclipse.emf.mwe2.launch'
|
|
mwe2Runtime "org.eclipse.xtext:org.eclipse.xtext.common.types:$versions.xtext_bootstrap"
|
|
mwe2Runtime "org.eclipse.xtext:org.eclipse.xtext.ecore:$versions.xtext_bootstrap"
|
|
}
|
|
|
|
if (findProperty('compileXtend') == 'true') {
|
|
generateMwe2Xtext.xtextClasspath = rootProject.configurations.getByName('xtendCompiler')
|
|
}
|
|
|
|
class XtextGeneratorTask extends JavaExec {
|
|
XtextGeneratorTask() {
|
|
group = 'Build'
|
|
main = 'org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher'
|
|
classpath = project.sourceSets.mwe2.runtimeClasspath
|
|
}
|
|
def setWorkflow(File workflowFile) {
|
|
args = [workflowFile.toURI().toString(), "-p", "rootPath=${project.rootDir}"]
|
|
inputs.file workflowFile
|
|
description "Execute the MWE2 workflow ${workflowFile.name}"
|
|
}
|
|
}
|
|
|
|
ext.XtextGeneratorTask = XtextGeneratorTask
|