Skip to content

Commit

Permalink
Pass CI on Java 17.
Browse files Browse the repository at this point in the history
(#36)
  • Loading branch information
netdpb authored Oct 3, 2022
1 parent 0ab814a commit 87faaf0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11 # Java version tested by the Checker Framework
uses: actions/setup-java@v1
- uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17
- uses: actions/cache@v1
with:
path: ~/.gradle/caches
Expand Down
9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'com.diffplug.gradle.spotless' version '4.0.1'
id 'eclipse'
// https://github.com/tbroyer/gradle-errorprone-plugin
id 'net.ltgt.errorprone' version '1.3.0'
id 'net.ltgt.errorprone' version '2.0.2'
}

repositories {
Expand Down Expand Up @@ -37,7 +37,7 @@ dependencies {
testImplementation files("${cfHome}/framework-test/build/libs/framework-test-3.21.5-SNAPSHOT.jar")

errorproneJavac "com.google.errorprone:javac:9+181-r4173-1"
errorprone "com.google.errorprone:error_prone_core:2.4.0"
errorprone "com.google.errorprone:error_prone_core:2.15.0"
}

tasks.withType(JavaCompile).all {
Expand Down Expand Up @@ -68,6 +68,11 @@ tasks.withType(Test) {
jvmArgs "-Xbootclasspath/p:${configurations.errorproneJavac.asPath}"
}

// Required because checker-framework uses APIs from these modules.
jvmArgs(
["code", "comp", "main", "processing", "tree", "util"]
.collect { "--add-opens=jdk.compiler/com.sun.tools.javac.$it=ALL-UNNAMED" })

testLogging {
showStackTraces = false
showStandardStreams = true
Expand Down
8 changes: 6 additions & 2 deletions initialize-project
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ if [[ ! -d "${PLUME_SCRIPTS}" ]]; then
fi

if [[ ! -d "${CHECKER_FRAMEWORK}" ]]; then
"${PLUME_SCRIPTS}"/git-clone-related jspecify checker-framework -q
"${PLUME_SCRIPTS}"/git-clone-related jspecify checker-framework
fi

if [[ ! -d "${JSPECIFY}" ]]; then
# We test using some modified samples in a different branch of the jspecify
# repo, so we check out that branch.
"${PLUME_SCRIPTS}"/git-clone-related --upstream-branch samples-google-prototype jspecify jspecify -q
"${PLUME_SCRIPTS}"/git-clone-related --upstream-branch samples-google-prototype jspecify jspecify
fi

if [[ ! -d "../jdk" ]]; then
"${PLUME_SCRIPTS}"/git-clone-related jspecify jdk
fi

0 comments on commit 87faaf0

Please sign in to comment.