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
Update gradle 6 #1948
Update gradle 6 #1948
Conversation
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
Gradle 6 does not like that we run a build twice, as part of a Gradle task. Therefore, we have to move the checksum computation out of the gradle task in a separate Bash script.
@mrwilson I had to update our checksum computation, as Gradle 6 was not happy with tasks that rebuild |
Otherwise we lose the code coverage, as we run a `gradle clean` in the reproducibility check.
- jdk: openjdk8 | ||
script: ./check_reproducibility.sh |
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.
- jdk: openjdk8 | |
script: ./check_reproducibility.sh | |
- name: "Check reproducibility" | |
jdk: openjdk8 | |
script: ./check_reproducibility.sh |
Taking a look in Travis right now, it looks like "just" another Jdk 8 build and this would allow people to identify this particular job at a glance if it starts failing.
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.
I am going to do this in a follow-up, as we can do some more cleanup of the Travis tasks. Thanks for the suggestion 😄
Ah, I've hit this before (doing stuff with Running it as a separate task is a good idea too 👍 I've added one small suggestion. This script works for the JUnit 5 project, so if it's passing the builds then I'm content that it's behaving as expected. |
Thanks for the review, I will fix the Travis name. Meanwhile, CodeCov is not happy with this Gradle change, so I gotta figure why that is broken. (This happened with a previous Gradle upgrade as well) |
This now also makes use of the build cache, which should significantly speed up Travis builds.
Codecov Report
@@ Coverage Diff @@
## release/3.x #1948 +/- ##
=================================================
- Coverage 86.68% 86.30% -0.38%
- Complexity 2527 2542 +15
=================================================
Files 318 318
Lines 6652 6738 +86
Branches 833 838 +5
=================================================
+ Hits 5766 5815 +49
- Misses 685 712 +27
- Partials 201 211 +10
Continue to review full report at Codecov.
|
Coverage changes are as expected. We no longer include the android subproject in our files and the Kotlin experimental test suite has been upgraded. We can clean that up in a follow-up PR. Given that this is mostly a mechanical change, I am going to go ahead and merge this. There is plenty of things we can clean up in follow-up PRs, but this PR is already getting quite big. |
* Upgrade to Gradle 6 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 mockito#1923 * Remove commented plugin * Move checksum computation out of Gradle Gradle 6 does not like that we run a build twice, as part of a Gradle task. Therefore, we have to move the checksum computation out of the gradle task in a separate Bash script. * Run reproducibility check as a separate Travis build Otherwise we lose the code coverage, as we run a `gradle clean` in the reproducibility check. * Fix code coverage This now also makes use of the build cache, which should significantly speed up Travis builds. * Fix disabling of projects for the coverage task * Fix exclusion of errorprone subproject * Reverse logic in coverage.gradle
This included a couple of breaking changes:
plugin instead
library versions
Gradle 6 is required for us to build on Java 14.
Supersedes and closes #1923