diff --git a/xtext-gradle-plugin/src/integTest/java/org/xtext/gradle/test/WhenTheEclipsePluginIsApplied.xtend b/xtext-gradle-plugin/src/integTest/java/org/xtext/gradle/test/WhenTheEclipsePluginIsApplied.xtend index 954ff4b..345cba5 100644 --- a/xtext-gradle-plugin/src/integTest/java/org/xtext/gradle/test/WhenTheEclipsePluginIsApplied.xtend +++ b/xtext-gradle-plugin/src/integTest/java/org/xtext/gradle/test/WhenTheEclipsePluginIsApplied.xtend @@ -55,7 +55,7 @@ class WhenTheEclipsePluginIsApplied extends AbstractIntegrationTest { prefs.shouldContain('generateGeneratedAnnotation', false) prefs.shouldContain('includeDateInGenerated', false) prefs.shouldContain('useJavaCompilerCompliance', false) - prefs.shouldContain('targetJavaVersion', 'Java6') + prefs.shouldContain('targetJavaVersion', 'JAVA6') prefs.shouldContain('outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder', true) prefs.shouldContain('outlet.DEFAULT_OUTPUT.installDslAsPrimarySource', false) prefs.shouldContain('outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables', true) diff --git a/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextEclipseSettings.xtend b/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextEclipseSettings.xtend index 0e0e420..03de8f0 100644 --- a/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextEclipseSettings.xtend +++ b/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextEclipseSettings.xtend @@ -54,7 +54,7 @@ class XtextEclipseSettings extends DefaultTask { if (generatedAnnotation.comment !== null) { prefs.put("generatedAnnotationComment", generatedAnnotation.comment) } - prefs.put("targetJavaVersion", "Java" + JavaVersion.toVersion(javaSourceLevel).majorVersion) + prefs.put("targetJavaVersion", "JAVA" + JavaVersion.toVersion(javaSourceLevel).majorVersion) prefs.putBoolean("useJavaCompilerCompliance", false) outlets.forEach [ outlet | addOutletPreferences(prefs, language, outlet)