Merge pull request #286 from eclipse/cd_issue284

[Wizard] Include .xtext file in jar created by gradle #284
This commit is contained in:
Christian Dietrich 2017-02-23 10:54:29 +01:00 committed by GitHub
commit 91415830fc
4 changed files with 28 additions and 4 deletions

View file

@ -25,7 +25,7 @@ if (name.endsWith(".tests")) {
}
sourceSets.all {
resources.exclude '**/*.g', '**/*.xtext', '**/*.mwe2', '**/*.xtend', '**/*._trace'
resources.exclude '**/*.g', '**/*.mwe2', '**/*.xtend', '**/*._trace'
}
jar {

View file

@ -15,6 +15,9 @@ jar {
from('model') {
into('model')
}
from(sourceSets.main.allSource) {
include '**/*.xtext'
}
manifest {
attributes 'Bundle-SymbolicName': project.name
}

View file

@ -154,7 +154,7 @@ class ParentProjectDescriptor extends ProjectDescriptor {
}
sourceSets.all {
resources.exclude '**/*.g', '**/*.xtext', '**/*.mwe2', '**/*.xtend', '**/*._trace'
resources.exclude '**/*.g', '**/*.mwe2', '**/*.xtend', '**/*._trace'
}
«ELSE»
sourceSets {
@ -174,7 +174,12 @@ class ParentProjectDescriptor extends ProjectDescriptor {
jar {
from('model') {
into('model')
}
}
«IF config.sourceLayout != SourceLayout.PLAIN»
from(sourceSets.main.allSource) {
include '**/*.xtext'
}
«ENDIF»
manifest {
attributes 'Bundle-SymbolicName': project.name
}

View file

@ -398,7 +398,7 @@ public class ParentProjectDescriptor extends ProjectDescriptor {
_builder.append("sourceSets.all {");
_builder.newLine();
_builder.append("\t");
_builder.append("resources.exclude \'**/*.g\', \'**/*.xtext\', \'**/*.mwe2\', \'**/*.xtend\', \'**/*._trace\'");
_builder.append("resources.exclude \'**/*.g\', \'**/*.mwe2\', \'**/*.xtend\', \'**/*._trace\'");
_builder.newLine();
_builder.append("}");
_builder.newLine();
@ -481,6 +481,22 @@ public class ParentProjectDescriptor extends ProjectDescriptor {
_builder.append("\t");
_builder.append("}");
_builder.newLine();
{
SourceLayout _sourceLayout_1 = this.getConfig().getSourceLayout();
boolean _notEquals = (!Objects.equal(_sourceLayout_1, SourceLayout.PLAIN));
if (_notEquals) {
_builder.append("\t");
_builder.append("from(sourceSets.main.allSource) {");
_builder.newLine();
_builder.append("\t");
_builder.append("\t");
_builder.append("include \'**/*.xtext\'");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
}
}
_builder.append("\t");
_builder.append("manifest {");
_builder.newLine();