-
Notifications
You must be signed in to change notification settings - Fork 299
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
Run some tests on JDK 17 #511
Conversation
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out NullAway sources | ||
uses: actions/checkout@v2 | ||
- name: 'Set up JDK ${{ matrix.java }}' | ||
uses: actions/setup-java@v1 | ||
uses: actions/setup-java@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took the opportunity to use the latest setup-java
action and specify the zulu
distribution (same as what Error Prone uses, though it shouldn't matter)
} | ||
} | ||
|
||
apply plugin: 'com.vanniktech.maven.publish' | ||
|
||
jacoco { | ||
toolVersion = "0.8.2" | ||
toolVersion = "0.8.7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for JDK 17 compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me 🚀 !
@@ -66,13 +66,29 @@ test { | |||
maxHeapSize = "1024m" | |||
if (!JavaVersion.current().java9Compatible) { | |||
jvmArgs "-Xbootclasspath/p:${configurations.errorproneJavac.asPath}" | |||
} else { | |||
// to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Wonder if we might need to change our own READMEs here once we officially support JDK 17.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need to make a pass on our READMEs, particularly for non-Android support; see #467 (which I really need to get back to). For Gradle users, I think these flags all get added automatically by gradle-errorprone-plugin
. We need to add them manually here since our unit test runs don't get configured using that plugin
This change adds a CI job so we run the same tests on JDK 17 that we currently run on JDK 11. Currently we only test using the latest version of Error Prone; we could also test using 2.4.0 if desired. In either case, the new job(s) should be added as "required" for future changes to land.