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
build(deps): fix build issues #11096
Conversation
5f22b76
to
2d07ad0
Compare
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.
Always amazing seeing you do this.
A few questions, then let's get this in
This should optimize LRU cache eviction so main and branches always have reasonably fresh gradle caches and main does not ever get evicted, since branches have independent caches and would otherwise fill up 10GB cache limit Note that `--daemon` is specified as the default for this action is no daemon, that is correct for long-lived runners to avoid cross-build contamination, but on GitHub Hosted Runners (which we use) we are clean each run, so this is a small optimization to share gradle between steps: gradle/gradle-build-action#113 (comment)
This is the recommended way to upgrade hamcrest from 1.x to 2.x when using junit 4.x, see http://hamcrest.org/JavaHamcrest/distributables#gradle-upgrade-example
extract our best-practices build settings to project-level file, apply to all sub-projects Fixes ankidroid#11083
2d07ad0
to
39d3e71
Compare
One confirmation I'd like is whether the "0 emulator" case was re-tested |
Tested the snot out of it, my local API21 is a great test. So I redid tests of API21 solo, API21+API31, API31 solo, got expected results (well actually saw it was all messed up first, then got expected results with bonus debugging output to help verify which I will remove, good spot). |
39d3e71
to
cf297f1
Compare
Sometimes an emulator "runs" tests, but it actually discovered zero tests, runs zero tests, and still reports success. Lookin' at you API21. Fixes ankidroid#11078
It appears upstream has fixed the leak as of 0.45.0, so workaround not needed, and ktlint is now on 0.45.2 anyway, so use that Can't remove the actual version override that gets us 0.45.x until the ktlint gradle plugin has a new release but that hasn't happened yet
cf297f1
to
83e97ce
Compare
Pull Request template
Purpose / Description
Each commit here does a thing in our build scripts -
1- a simple jacoco version update (dependabot doesn't see these for whatever reason)
2- using gradle-build-action in all our workflows (I trialed it in emulator tests, works well, Fixes #11080)
3- hamcrest is used in multiple modules, extract version, update it in lagging module
4- extract our build best practices so lint-rules gets
-Werror
compiler arg "for free" (Fixes #11083)5- post-process androidTest XML to make sure non-zero # of tests ran (Fixes #11078)
Fixes
Linked above
Approach
How Has This Been Tested?
I tested the -Werror / "extract build common practices" by doing
git revert a70c0f6a381b31ad205388d4b5e3d6e1f3198f15
then running the build - ✔️ got the expected errorI tested the zero tests by starting android API21 locally by itself, API21 + API31, and API31 by itself. 31 by itself passes (:heavy_check_mark:) but any time 21 is in - by itself or in combo with others - :heavy_check_mark: get the expected error:
Learning (optional, can help others)