Skip to content

Commit

Permalink
Context Mapper on Java 17 (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-ka authored Nov 23, 2022
1 parent 0b248f2 commit b4e7cf2
Show file tree
Hide file tree
Showing 67 changed files with 775 additions and 391 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
Expand All @@ -42,10 +42,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
Expand All @@ -70,10 +70,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
Expand Down Expand Up @@ -112,10 +112,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
Expand All @@ -39,10 +39,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Configure Git user
run: |
git config user.email "[email protected]"
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
Expand All @@ -38,10 +38,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
Expand All @@ -65,10 +65,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Gradle caches
Expand Down Expand Up @@ -106,10 +106,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- name: Install Graphviz
run: sudo apt-get -y install graphviz
- name: Cache local Maven repository
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.class
**/target
**/out
**/bin

# Log file
*.log
Expand All @@ -25,8 +26,6 @@
hs_err_pid*

# Eclipse files
*.project
*.classpath
**/.settings
plugin.xml_gen

Expand Down
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.contextmapper.dsl.parent</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
33 changes: 11 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
buildscript {
repositories {
mavenCentral()
jcenter()
gradlePluginPortal()
}
dependencies {
classpath 'org.xtext:xtext-gradle-plugin:2.0.8'
classpath 'org.xtext:xtext-gradle-plugin:3.0.2'
}
}

def pomXml = new XmlSlurper().parse('pom.xml')

subprojects {
ext.xtextVersion = '2.23.0'
ext.xtextVersion = '2.28.0'
repositories {
jcenter()
mavenCentral()
}

apply plugin: 'java'
apply plugin: 'java-library'
dependencies {
api platform("org.eclipse.xtext:xtext-dev-bom:${xtextVersion}")
}
apply plugin: 'maven-publish'
apply plugin: 'org.xtext.xtend'
apply from: "${rootDir}/gradle/source-layout.gradle"
Expand All @@ -27,28 +30,14 @@ subprojects {
group = 'org.contextmapper'
version = pomXml.version

sourceCompatibility = '1.8'
targetCompatibility = '1.8'
sourceCompatibility = '11'
targetCompatibility = '11'

configurations.all {
exclude group: 'asm'
}

if (!project.hasProperty('signing.secretKeyRingFile')) {
project.ext.'signing.secretKeyRingFile' = "${rootDir}/secret-key.gpg"
}

// workaround for XText+Gradle build problems: https://github.com/eclipse/xtext/issues/1976#issuecomment-862141814
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.eclipse.platform' && details.requested.name == 'org.eclipse.core.runtime') {
details.useVersion "3.19.0"
}
if (details.requested.group == 'org.eclipse.platform' && details.requested.name == 'org.eclipse.equinox.common') {
details.useVersion("3.13.0")
}
}
}
}
}
11 changes: 6 additions & 5 deletions gradle/maven-deployment.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//see https://docs.gradle.org/current/userguide/maven_plugin.html
apply plugin: 'maven'
apply plugin: 'maven-publish'

uploadArchives {
publishing {
repositories {
mavenDeployer {
repository(url: "file://${buildDir}/localRepo")
snapshotRepository(url: "file://${buildDir}/localRepo")
maven {
def releasesRepoUrl = "file://${buildDir}/localRepo"
def snapshotsRepoUrl = "file://${buildDir}/localRepo"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}
4 changes: 2 additions & 2 deletions gradle/source-layout.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ if (name.endsWith("-tests")) {
resources.srcDirs = []
}
test {
java.srcDirs = ['src', 'src-gen']
java.srcDirs = ['src', 'src-gen', 'xtend-gen']
resources.srcDirs = ['src', 'src-gen']
xtendOutputDir = 'xtend-gen'
}
}
} else {
sourceSets {
main {
java.srcDirs = ['src', 'src-gen']
java.srcDirs = ['src', 'src-gen', 'xtend-gen']
resources.srcDirs = ['src', 'src-gen']
xtendOutputDir = 'xtend-gen'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
23 changes: 23 additions & 0 deletions org.contextmapper.dsl.feature/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.contextmapper.dsl.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.contextmapper.dsl.feature"
label="Context Mapper DSL Editor"
version="6.6.2.qualifier"
version="6.7.0.qualifier"
provider-name="Context Mapper Project Team"
plugin="org.contextmapper.dsl.ui">

Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.contextmapper.dsl</groupId>
<artifactId>org.contextmapper.dsl.parent</artifactId>
<version>6.6.2-SNAPSHOT</version>
<version>6.7.0-SNAPSHOT</version>
</parent>
<artifactId>org.contextmapper.dsl.feature</artifactId>
<packaging>eclipse-feature</packaging>
Expand Down
21 changes: 21 additions & 0 deletions org.contextmapper.dsl.ide.tests/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/test-classes" path="src">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src-gen">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="xtend-gen">
<attributes>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
40 changes: 40 additions & 0 deletions org.contextmapper.dsl.ide.tests/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.contextmapper.dsl.ide.tests</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
Loading

0 comments on commit b4e7cf2

Please sign in to comment.