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

ci: properly cache gradle #2150

Merged
merged 3 commits into from
Dec 1, 2023
Merged

ci: properly cache gradle #2150

merged 3 commits into from
Dec 1, 2023

Conversation

szymonrybczak
Copy link
Collaborator

Summary:

Every time we're running root.test.ts it downloads Gradle. In template there's specified Gradle's -all distribution, but with gradle/gradle-build-action we can't specify it :( So we need to overwrite to -bin.

Test Plan:

CI should cache Gradle version.

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@szymonrybczak
Copy link
Collaborator Author

Blocked by: #2148

@thymikee thymikee requested a review from cortinico November 2, 2023 08:58
@szymonrybczak szymonrybczak force-pushed the ci/properly-cache-gradle branch from bbc41bf to a63a0c8 Compare November 2, 2023 09:04
@thymikee
Copy link
Member

thymikee commented Nov 2, 2023

@szymonrybczak mind rebasing?

@szymonrybczak szymonrybczak force-pushed the ci/properly-cache-gradle branch from a63a0c8 to 6b688b4 Compare November 2, 2023 13:18
@@ -49,12 +49,17 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'gradle'
Copy link
Member

Choose a reason for hiding this comment

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

you should remove this line if you use gradle/gradle-build-action

Comment on lines +57 to +63
await spawnScript(
gradleWrapper,
['wrapper', '--gradle-version=8.0.1', '--distribution-type', 'bin'],
{
cwd: androidProjectRoot,
},
);
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is necessary 🤔 I've been using gradle/gradle-build-action with several projects which have the -all distribution and I haven't noticed re-downloads of Gradle.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So I gave it a try and it is getting re-downloaded :( See here.

CleanShot 2023-11-29 at 19 53 33@2x

Copy link
Member

Choose a reason for hiding this comment

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

Great thanks for clarifying

@szymonrybczak szymonrybczak merged commit 04d6694 into main Dec 1, 2023
10 checks passed
@szymonrybczak szymonrybczak deleted the ci/properly-cache-gradle branch December 1, 2023 12:59
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.

4 participants