[build] Use build result from xtend-bootstrap job for Xtend compiler, added skipXtendCompiler option

This commit is contained in:
Miro Spönemann 2017-01-02 11:47:11 +01:00
parent 0ebf15db7d
commit 6a13144f08
4 changed files with 24 additions and 12 deletions

View file

@ -30,7 +30,9 @@ subprojects {
version = rootProject.version
apply plugin: 'java'
apply plugin: 'org.xtext.xtend'
if (findProperty('skipXtendCompiler') != 'true') {
apply plugin: 'org.xtext.xtend'
}
apply plugin: 'eclipse'
apply plugin: 'maven'

View file

@ -5,7 +5,10 @@
// The repositories to query when constructing the Xtend compiler classpath
repositories {
jcenter()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
maven {
name 'xtend-bootstrap'
url 'http://services.typefox.io/open-source/jenkins/job/xtend-bootstrap/lastStableBuild/artifact/build-result/maven-repository/'
}
}
// The Xtend compiler version to use
@ -28,5 +31,6 @@ configurations {
dependencies {
xtendCompiler "org.eclipse.xtend:org.eclipse.xtend.core:$bootstrapXtendVersion"
xtendCompiler "org.eclipse.xtext:org.eclipse.xtext.smap:$bootstrapXtendVersion"
xtendCompiler "org.xtext:xtext-gradle-builder:$versions.xtend_plugin"
}

View file

@ -16,7 +16,11 @@ sourceSets {
srcDirs = sourceDirs
exclude '**/*.java', '**/*.xtend'
}
xtendOutputDir = 'xtend-gen'
if (findProperty('skipXtendCompiler') == 'true') {
java.srcDir 'xtend-gen'
} else {
xtendOutputDir = 'xtend-gen'
}
}
configure(isTestProject? main : test) {
java.srcDirs = []

View file

@ -2,17 +2,19 @@
* Configuration of Xtend compiler.
*/
[generateXtext, generateTestXtext].each { gen ->
gen.xtextClasspath = rootProject.configurations.getByName('xtendCompiler')
}
sourcesJar {
from (sourceSets.main.xtendOutputDir) {
include '**/*._trace'
if (findProperty('skipXtendCompiler') != 'true') {
[generateXtext, generateTestXtext].each { gen ->
gen.xtextClasspath = rootProject.configurations.getByName('xtendCompiler')
}
if (name.endsWith('tests')) {
from (sourceSets.test.xtendOutputDir) {
sourcesJar {
from (sourceSets.main.xtendOutputDir) {
include '**/*._trace'
}
if (name.endsWith('tests')) {
from (sourceSets.test.xtendOutputDir) {
include '**/*._trace'
}
}
}
}