Skip to content

Commit

Permalink
Improve compatibility with older Xtext versions
Browse files Browse the repository at this point in the history
Older Xtext versions did not declare the hard dependency from xtext.java
to jdt.core. To work around this we add the lowest compatible version of
jdt core to the runtime classpath and let Gradle do conflict resolution in
case a newer Xtext version needs a newer JDT version.
  • Loading branch information
oehme committed Jan 21, 2017
1 parent 5b5cd79 commit 1afe1da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
minimumXtextVersion = 2.9.0
#We can't use 2.11 while we still want Java 6 support
bootstrapXtextVersion = 2.9.1
latestXtextVersion = 2.11.0.beta2
latestXtextVersion = 2.11.0.RC1
9 changes: 6 additions & 3 deletions xtext-gradle-builder/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
description 'A small wrapper for Xtext to make it easier to use from Gradle'

dependencies {
compile project(':xtext-gradle-protocol')
compile "org.eclipse.xtext:org.eclipse.xtext:$minimumXtextVersion"
compile "org.eclipse.xtext:org.eclipse.xtext.java:$minimumXtextVersion"
compile "org.eclipse.xtext:org.eclipse.xtext.xbase:$minimumXtextVersion"
compile "org.eclipse.xtext:org.eclipse.xtext.smap:$minimumXtextVersion"
compile project(':xtext-gradle-protocol')
compile "org.eclipse.xtext:org.eclipse.xtext.xbase:$minimumXtextVersion"

runtime "org.eclipse.xtext:org.eclipse.xtext.java:$minimumXtextVersion"
//workaround for old Xtext versions not declaring this hard dependency
runtime "org.eclipse.jdt:org.eclipse.jdt.core:3.10.0"
}

0 comments on commit 1afe1da

Please sign in to comment.