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

Test against Java 11 #438

Merged
merged 2 commits into from
Jul 9, 2021
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
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11' ]
name: Java ${{ matrix.Java }} build
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: adopt
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: ./gradlew build
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
22 changes: 0 additions & 22 deletions .github/workflows/gradle-java8.yml

This file was deleted.

10 changes: 7 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ plugins {
}

ext {
javaApi = "https://docs.oracle.com/javase/8/docs/api/"
if (JavaVersion.current() >= JavaVersion.VERSION_11) {
javaApi = "https://docs.oracle.com/en/java/javase/11/docs/api"
}
javadocLinks = [
"https://docs.oracle.com/javase/8/docs/api/",
"https://docs.spring.io/spring/docs/${springFrameworkVersion}/javadoc-api/"
javaApi,
"https://docs.spring.io/spring-framework/docs/${springFrameworkVersion}/javadoc-api/"
] as String[]
}

Expand Down Expand Up @@ -199,7 +203,7 @@ configure(staticAnalysisProjects) {
apply plugin: "jacoco"

checkstyle {
configFile = file("${project.rootDir}/src/checkstyle/checkstyle.xml")
configDirectory = rootProject.file("src/checkstyle")
toolVersion = "${checkstyleVersion}"
showViolations = true
}
Expand Down
4 changes: 2 additions & 2 deletions src/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@

<!-- Suppressions -->
<module name="SuppressionFilter">
<property name="file" value="src/checkstyle/checkstyle-suppressions.xml"/>
<property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
</module>

<!-- License Header -->
<module name="Header">
<property name="headerFile" value="src/checkstyle/license.header"/>
<property name="headerFile" value="${config_loc}/license.header"/>
<property name="ignoreLines" value="2, 8"/>
</module>

Expand Down