mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 16:28:56 +00:00
45 lines
1.6 KiB
Groovy
45 lines
1.6 KiB
Groovy
/*
|
|
* Bootstrap project for the Xtext language. It contains an MWE2 generator workflow with
|
|
* dedicated configuration code. The workflow generates into the core and generic ide projects
|
|
* as well as the Eclipse and IDEA integration projects, which are defined in different
|
|
* source repositories. The path to these other repositories is assumed to be ../xtext-eclipse
|
|
* and ../xtext-idea, respectively.
|
|
*/
|
|
|
|
apply from: "${rootDir}/gradle/mwe2-workflows.gradle"
|
|
|
|
dependencies {
|
|
// We cannot use the projects within the workspace, as we would have
|
|
// to compile them before generating the code, so we need to stick to the bootstrapping version.
|
|
// Buildship, however, links the workspace projects anyway if a composite build is used.
|
|
compile "org.eclipse.xtext:org.eclipse.xtext:$versions.xtext_bootstrap"
|
|
compile "org.eclipse.xtext:org.eclipse.xtext.xtext.generator:$versions.xtext_bootstrap"
|
|
}
|
|
|
|
sourceSets.main.java.srcDirs = []
|
|
sourceSets.main.resources.srcDirs = []
|
|
sourceSets.test.java.srcDirs = []
|
|
sourceSets.test.resources.srcDirs = []
|
|
|
|
sourceSets.mwe2 {
|
|
java.srcDir 'src'
|
|
if (findProperty('compileXtend') == 'true') {
|
|
xtendOutputDir = 'xtend-gen'
|
|
} else {
|
|
java.srcDir 'xtend-gen'
|
|
}
|
|
}
|
|
configurations.mwe2Compile.extendsFrom configurations.compile
|
|
jar.from sourceSets.mwe2.output
|
|
sourcesJar.from sourceSets.mwe2.allSource
|
|
|
|
task generateXtextLanguage(type: XtextGeneratorTask) {
|
|
workflow = file('src/org/eclipse/xtext/xtext/bootstrap/GenerateXtext.mwe2')
|
|
}
|
|
|
|
eclipse {
|
|
project {
|
|
natures 'org.eclipse.xtext.ui.shared.xtextNature'
|
|
buildCommands.add(0,new org.gradle.plugins.ide.eclipse.model.BuildCommand('org.eclipse.xtext.ui.shared.xtextBuilder'))
|
|
}
|
|
}
|