Merge pull request #1700 from eclipse/cd_tycho23

use tycho 2.3 with Java11/Target Platform 2021-06+
This commit is contained in:
Christian Dietrich 2021-04-20 07:09:39 +02:00 committed by GitHub
commit 9ebc9b4268
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 4 deletions

View file

@ -13,7 +13,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- Tycho settings -->
<tycho-version>1.7.0</tycho-version>
<tycho-version>2.3.0</tycho-version>
<!-- Define overridable properties for tycho-surefire-plugin -->
<platformSystemProperties></platformSystemProperties>
<moduleProperties></moduleProperties>

View file

@ -11,6 +11,7 @@ package org.eclipse.xtext.xtext.wizard
import com.google.common.base.Charsets
import com.google.common.io.Resources
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
import org.eclipse.xtext.util.JavaVersion
@FinalFieldsConstructor
class ParentProjectDescriptor extends ProjectDescriptor {
@ -69,6 +70,10 @@ class ParentProjectDescriptor extends ProjectDescriptor {
}
def String getTychoVersion() {
'2.3.0'
}
def String getTychoVersionJ8() {
'1.7.0'
}
@ -212,7 +217,7 @@ class ParentProjectDescriptor extends ProjectDescriptor {
<maven.compiler.target>«javaVersion»</maven.compiler.target>
«IF config.needsTychoBuild»
<!-- Tycho settings -->
<tycho-version>«tychoVersion»</tycho-version>
<tycho-version>«IF config.javaVersion.isAtLeast(JavaVersion.JAVA11)»«tychoVersion»«ELSE»«tychoVersionJ8»«ENDIF»</tycho-version>
<!-- Define overridable properties for tycho-surefire-plugin -->
<platformSystemProperties></platformSystemProperties>
<moduleProperties></moduleProperties>

View file

@ -18,6 +18,7 @@ import java.util.Collections;
import java.util.Set;
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.util.JavaVersion;
import org.eclipse.xtext.util.XtextVersion;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Exceptions;
@ -105,6 +106,10 @@ public class ParentProjectDescriptor extends ProjectDescriptor {
}
public String getTychoVersion() {
return "2.3.0";
}
public String getTychoVersionJ8() {
return "1.7.0";
}
@ -565,8 +570,16 @@ public class ParentProjectDescriptor extends ProjectDescriptor {
_builder.newLine();
_builder.append("\t");
_builder.append("<tycho-version>");
String _tychoVersion = this.getTychoVersion();
_builder.append(_tychoVersion, "\t");
{
boolean _isAtLeast = this.getConfig().getJavaVersion().isAtLeast(JavaVersion.JAVA11);
if (_isAtLeast) {
String _tychoVersion = this.getTychoVersion();
_builder.append(_tychoVersion, "\t");
} else {
String _tychoVersionJ8 = this.getTychoVersionJ8();
_builder.append(_tychoVersionJ8, "\t");
}
}
_builder.append("</tycho-version>");
_builder.newLineIfNotEmpty();
_builder.append("\t");