2016-11-22 15:35:07 +00:00
|
|
|
/*
|
|
|
|
* Configuration of Xtend compiler.
|
|
|
|
*/
|
|
|
|
|
2017-01-06 12:56:39 +00:00
|
|
|
if (findProperty('compileXtend') == 'true') {
|
2017-01-02 10:47:11 +00:00
|
|
|
[generateXtext, generateTestXtext].each { gen ->
|
|
|
|
gen.xtextClasspath = rootProject.configurations.getByName('xtendCompiler')
|
2016-12-23 09:26:51 +00:00
|
|
|
}
|
2017-01-02 10:47:11 +00:00
|
|
|
|
2017-01-11 14:53:40 +00:00
|
|
|
// Defer the sources jar configuration to later when the source sets are set up completely
|
|
|
|
afterEvaluate {
|
|
|
|
sourcesJar {
|
|
|
|
from (sourceSets.main.xtendOutputDir) {
|
2017-01-02 10:47:11 +00:00
|
|
|
include '**/*._trace'
|
|
|
|
}
|
2017-01-11 14:53:40 +00:00
|
|
|
if (name.endsWith('tests')) {
|
|
|
|
from (sourceSets.test.xtendOutputDir) {
|
|
|
|
include '**/*._trace'
|
|
|
|
}
|
|
|
|
}
|
2017-01-02 10:47:11 +00:00
|
|
|
}
|
2016-12-23 07:45:26 +00:00
|
|
|
}
|
|
|
|
}
|