Navigation Menu

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

[Travis] Replace JDK 9/10 with 14 #1945

Merged
merged 8 commits into from Jun 17, 2020
Merged

Conversation

TimvdLippe
Copy link
Contributor

9/10 are EOL since September 2018. 14 is the currently supported
Java version.

9/10 are EOL since September 2018. 14 is the currently supported
Java version.
Copy link
Member

@mockitoguy mockitoguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build is failing however I'm +1 to the goals of this PR. Thx!

@TimvdLippe
Copy link
Contributor Author

Yeah I am working on resolving the build issue. We need to upgrade our Gradle version. Sadly that turns out to be a whole rabbithole, but I think I am close.

This included a couple of breaking changes:
- The build plugin is now part of the Gradle Enterprise plugin
- The osgi plugin was removed, for which we have to use the bndtools
plugin instead
- Kotlin version has to be updated, including their coroutine
library versions

Gradle 6 is required for us to build on Java 14.

Supersedes and closes #1923
@TimvdLippe TimvdLippe changed the base branch from release/3.x to update-gradle-6 June 15, 2020 14:42
Base automatically changed from update-gradle-6 to release/3.x June 16, 2020 13:20
@epeee
Copy link
Contributor

epeee commented Jun 17, 2020

@TimvdLippe it looks like we also have to use errorprone 2.4.0 since this is the first version which actually supports java 14.

Task :compileJava
/home/travis/build/mockito/mockito/src/main/java/org/mockito/invocation/InvocationOnMock.java:57: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
T getArgument(int index);
^
Please report this at https://github.com/google/error-prone/issues/new and include the following:
error-prone version: 2.3.2
BugPattern: TypeParameterUnusedInFormals
Stack Trace:
java.lang.NoSuchFieldError: bound
at com.google.errorprone.bugpatterns.TypeParameterUnusedInFormals.matchMethod(TypeParameterUnusedInFormals.java:73)
at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:890)

@TimvdLippe
Copy link
Contributor Author

@epeee Yes indeed. Were you able to get Gradle working on your machine?!

@epeee
Copy link
Contributor

epeee commented Jun 17, 2020

yes. Furthermore, also the latest travis build (https://travis-ci.org/github/mockito/mockito/jobs/698954197) is failing with the message posted previously.

@TimvdLippe
Copy link
Contributor Author

Interesting, because I was looking at https://travis-ci.org/github/mockito/mockito/jobs/698954215 which is failing for a completely different reason :O

@TimvdLippe
Copy link
Contributor Author

I wonder maybe if the build cache is not working on one job, but is working on the other. Not sure how to diagnose this issue though.

@TimvdLippe
Copy link
Contributor Author

Oh, on the push Travis build, both tasks failed on the ErrorProne issue, but not the Gradle compilation issue. So out of 3 tasks, only the 1 on the PR build is failing.

@codecov-commenter
Copy link

codecov-commenter commented Jun 17, 2020

Codecov Report

Merging #1945 into release/3.x will decrease coverage by 0.55%.
The diff coverage is 83.47%.

Impacted file tree graph

@@                Coverage Diff                @@
##             release/3.x    #1945      +/-   ##
=================================================
- Coverage          86.76%   86.21%   -0.56%     
- Complexity          2494     2542      +48     
=================================================
  Files                311      318       +7     
  Lines               6552     6738     +186     
  Branches             821      838      +17     
=================================================
+ Hits                5685     5809     +124     
- Misses               670      715      +45     
- Partials             197      214      +17     
Impacted Files Coverage Δ Complexity Δ
src/main/java/org/mockito/AdditionalAnswers.java 95.00% <ø> (ø) 19.00 <0.00> (ø)
src/main/java/org/mockito/Answers.java 91.66% <ø> (ø) 3.00 <0.00> (ø)
src/main/java/org/mockito/ArgumentMatchers.java 99.08% <ø> (ø) 59.00 <0.00> (ø)
src/main/java/org/mockito/BDDMockito.java 88.23% <ø> (ø) 10.00 <0.00> (ø)
src/main/java/org/mockito/Matchers.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
src/main/java/org/mockito/Mockito.java 96.77% <ø> (ø) 42.00 <0.00> (ø)
...ito/exceptions/base/MockitoSerializationIssue.java 100.00% <ø> (ø) 3.00 <0.00> (ø)
...eptions/misusing/UnnecessaryStubbingException.java 100.00% <ø> (ø) 1.00 <0.00> (ø)
...ain/java/org/mockito/hamcrest/MockitoHamcrest.java 85.71% <ø> (ø) 9.00 <0.00> (ø)
...rc/main/java/org/mockito/internal/InOrderImpl.java 100.00% <ø> (ø) 10.00 <0.00> (ø)
... and 184 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9873ab3...a6bd661. Read the comment docs.

@TimvdLippe
Copy link
Contributor Author

I purged the corrupt Travis cache and was able to get a passing build. See gradle/gradle#13444 (comment) for more info.

@TimvdLippe TimvdLippe merged commit ddba092 into release/3.x Jun 17, 2020
@TimvdLippe TimvdLippe deleted the reconfigure-travis branch June 17, 2020 21:48
epeee pushed a commit to epeee/mockito that referenced this pull request Jun 22, 2020
9/10 are EOL since September 2018. 14 is the currently supported
Java version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants