Reputation: 49
I am trying to build the gradle project by applying the xtend plugin. But build is getting failed with some errors.
Can someone please suggest me with how to apply xtend plugin and build the entire project with out having any errors.
Below is the sample script i used:
plugins {
id "org.xtext.xtend" version "2.0.6"
id 'org.xtext.builder' version '2.0.6'
id 'java'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.eclipse.xtend:org.eclipse.xtend.lib:2.17.1'
xtextLanguages 'org.eclipse.xtend:org.eclipse.xtend.core:2.17.1'
}
sourceSets {
main.java.srcDirs = ['src','xtend-gen']
main.xtend.srcDirs = ['src/main/xtend','xtend-gen']
main.xtendOutputDir = 'xtend-gen'
}
xtext {
version = '2.17.1'
languages {
xtend {
setup = 'org.eclipse.xtend.core.XtendStandaloneSetup'
generator.outlet.producesJava = true
}
}
}
tasks.withType(org.xtext.gradle.tasks.XtextGenerate) {
bootstrapClasspath = configurations.compileClasspath
classesDirs = sourceSets.main.output.classesDirs
languages = [xtext.languages.xtend]
sourceSetOutputs = sourceSets.main.xtend.output
sources = sourceSets.main.xtend
}
Upvotes: 0
Views: 29
Reputation: 6463
Your error message suggests an incompatibility between the version of the Xtext plugins (2.0.6) and the version of Gradle (7.3.3) you are using.
The latest version of the Xtext plugins is 4.0.0. I suggest you upgrade to that version or, if there is a reason you must use an older version, downgrade Gradle. A quick look at past Gradle releases suggests that that error might have been introduced in version 4.0 of Gradle, so you should try Gradle versions before that.
Upvotes: 0