Skip to content

Commit

Permalink
JDK 17 support (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdietl authored Jun 13, 2022
1 parent 9605b9f commit da6008f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
jdk: [ 8, 11 ]
jdk: [ 8, 11, 17 ]
runs-on: ubuntu-latest
steps:
- name: Pull Request Checkout
Expand Down
21 changes: 16 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ ext {
ontologyPath = "${jsr308}/ontology"

isJava8 = JavaVersion.current() == JavaVersion.VERSION_1_8

// Keep in sync with checker-framework/build.gradle.
// TODO: find a way to directly use that variable.
compilerArgsForRunningCF = [
"--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
]
}

println '==================================='
Expand Down Expand Up @@ -96,15 +110,12 @@ afterEvaluate {
'path.inference.script': "${cfiPath}/scripts/inference"
]

if (isJava8) {
systemProperties += [JDK_JAR: "${cfPath}/checker/dist/jdk8.jar"]
}

environment "external_checker_classpath", "${ontologyPath}/build/classes/java/main:${ontologyPath}/build/libs/ontology.jar"


if (isJava8) {
jvmArgs "-Xbootclasspath/p:${cfiPath}/dist/javac.jar"
} else {
jvmArgs += compilerArgsForRunningCF
}

testLogging {
Expand Down

0 comments on commit da6008f

Please sign in to comment.