use of org.eclipse.xtext.util.XtextVersion in project xtext-core by eclipse.
the class CliWizardIntegrationTest method newProjectConfig.
private static WizardConfiguration newProjectConfig() {
WizardConfiguration _wizardConfiguration = new WizardConfiguration();
final Procedure1<WizardConfiguration> _function = (WizardConfiguration it) -> {
XtextVersion _xtextVersion = new XtextVersion("unspecified");
it.setXtextVersion(_xtextVersion);
it.setEncoding(Charsets.UTF_8);
LanguageDescriptor _language = it.getLanguage();
final Procedure1<LanguageDescriptor> _function_1 = (LanguageDescriptor it_1) -> {
it_1.setName("org.xtext.example.mydsl.MyDsl");
it_1.setFileExtensions(LanguageDescriptor.FileExtensions.fromString("mydsl"));
};
ObjectExtensions.<LanguageDescriptor>operator_doubleArrow(_language, _function_1);
};
return ObjectExtensions.<WizardConfiguration>operator_doubleArrow(_wizardConfiguration, _function);
}
use of org.eclipse.xtext.util.XtextVersion in project xtext-core by eclipse.
the class ParentProjectDescriptor method buildGradle.
@Override
public GradleBuildFile buildGradle() {
GradleBuildFile _buildGradle = super.buildGradle();
final Procedure1<GradleBuildFile> _function = (GradleBuildFile it) -> {
StringConcatenation _builder = new StringConcatenation();
_builder.append("buildscript {");
_builder.newLine();
_builder.append("\t");
_builder.append("repositories {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("jcenter()");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("\t");
_builder.append("dependencies {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("classpath \'org.xtext:xtext-gradle-plugin:");
String _xtextGradlePluginVersion = this.getConfig().getXtextVersion().getXtextGradlePluginVersion();
_builder.append(_xtextGradlePluginVersion, "\t\t");
_builder.append("\'");
_builder.newLineIfNotEmpty();
{
boolean _isEnabled = this.getConfig().getIntellijProject().isEnabled();
if (_isEnabled) {
_builder.append("\t\t");
_builder.append("classpath \'org.xtext:xtext-idea-gradle-plugin:");
String _xtextGradlePluginVersion_1 = this.getConfig().getXtextVersion().getXtextGradlePluginVersion();
_builder.append(_xtextGradlePluginVersion_1, "\t\t");
_builder.append("\'");
_builder.newLineIfNotEmpty();
}
}
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("subprojects {");
_builder.newLine();
_builder.append("\t");
_builder.append("ext.xtextVersion = \'");
XtextVersion _xtextVersion = this.getConfig().getXtextVersion();
_builder.append(_xtextVersion, "\t");
_builder.append("\'");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("repositories {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("jcenter()");
_builder.newLine();
{
boolean _isSnapshot = this.getConfig().getXtextVersion().isSnapshot();
if (_isSnapshot) {
_builder.append("\t\t");
_builder.append("maven {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("\t");
_builder.append("url \'https://oss.sonatype.org/content/repositories/snapshots\'");
_builder.newLine();
_builder.append("\t\t");
_builder.append("}");
_builder.newLine();
}
}
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
_builder.append("apply plugin: \'java\'");
_builder.newLine();
_builder.append("\t");
_builder.append("apply plugin: \'org.xtext.xtend\'");
_builder.newLine();
_builder.append("\t");
_builder.append("apply from: \"${rootDir}/gradle/source-layout.gradle\"");
_builder.newLine();
_builder.append("\t");
_builder.append("apply from: \"${rootDir}/gradle/maven-deployment.gradle\"");
_builder.newLine();
_builder.append("\t");
_builder.append("apply plugin: \'eclipse\'");
_builder.newLine();
_builder.append("\t");
_builder.append("apply plugin: \'idea\'");
_builder.newLine();
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
_builder.append("group = \'");
String _baseName = this.getConfig().getBaseName();
_builder.append(_baseName, "\t");
_builder.append("\'");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("version = \'1.0.0-SNAPSHOT\'");
_builder.newLine();
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
_builder.append("sourceCompatibility = \'");
String _javaVersion = this.getJavaVersion();
_builder.append(_javaVersion, "\t");
_builder.append("\'");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("targetCompatibility = \'");
String _javaVersion_1 = this.getJavaVersion();
_builder.append(_javaVersion_1, "\t");
_builder.append("\'");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
_builder.append("configurations.all {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("exclude group: \'asm\'");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
it.setAdditionalContent(_builder.toString());
};
return ObjectExtensions.<GradleBuildFile>operator_doubleArrow(_buildGradle, _function);
}
Aggregations