Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Java 11 to build #28

Merged
merged 1 commit into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/setup-java@v1.3.0
name: set up jdk ${{matrix.java}}
name: set up JDK 11
with:
java-version: ${{matrix.java}}
java-version: 11

- uses: actions/setup-java@v1.3.0
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/setup-java@v1.3.0
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/setup-java@v1.3.0
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>
dmlloyd marked this conversation as resolved.
Show resolved Hide resolved
<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