Skip to content

Commit

Permalink
Merge pull request #28 from dmlloyd/java-11
Browse files Browse the repository at this point in the history
Require Java 11 to build
  • Loading branch information
dmlloyd authored Apr 27, 2020
2 parents b3845aa + 8a6d6bf commit 92c5d52
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,24 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
name: build with jdk ${{matrix.java}}
name: build with JDK 11

steps:
- uses: actions/checkout@v2
name: checkout

- uses: actions/[email protected]
name: set up jdk ${{matrix.java}}
name: set up JDK 11
with:
java-version: ${{matrix.java}}
java-version: 11

- uses: actions/[email protected]
name: set up JDK 8
with:
java-version: 8

- name: build with maven
run: mvn -B formatter:validate verify --file pom.xml
run: JAVA_HOME=$JAVA_HOME_11_X64 mvn -B formatter:validate verify --file pom.xml -Djava8.home=$JAVA_HOME_8_X64

quality:
needs: [build]
Expand All @@ -46,7 +48,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
java-version: 8
java-version: 11

- name: sonar
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- uses: actions/[email protected]
with:
java-version: 8
java-version: 11

- name: maven release ${{steps.metadata.outputs.current-version}}
run: |
Expand Down
20 changes: 20 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,26 @@

<build>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version>
<executions>
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>11</version>
<message>This project must be built with Java 11 or later.</message>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down

0 comments on commit 92c5d52

Please sign in to comment.