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

Cache generated-gradle-jars into a tool-cache as well #27

Closed
vlsi opened this issue Aug 3, 2020 · 2 comments
Closed

Cache generated-gradle-jars into a tool-cache as well #27

vlsi opened this issue Aug 3, 2020 · 2 comments

Comments

@vlsi
Copy link

vlsi commented Aug 3, 2020

Have you tried caching generated-gradle-jars into tool-cache as well?

In other words:

  1. Download Gradle
  2. Execute it so it generates .gradle/caches/6.6/generate-gradle-jars/...
  3. Ensure generated-gradle-jars is cached into tool-cache (e.g. copy it to gradle location)
  4. As the tool is unpacked from the cache, copy generated-gradle-jars accordingly

See gradle/gradle#13982

Update: tool-cache does not cache files across job executions in GitHub runners (see actions/toolkit#58 (comment)), so currently tool-cache is not useful for caching gradle-generated-jars

@eskatos
Copy link
Member

eskatos commented Sep 13, 2020

There's another aspect to this. Gradle can generate three different JARs in that directory, the gradle-api jar, the gradle-kotlin-dsl-extensions jar and the gradle-test-kit jar. Those are generated on-demand so which jars get generated depends on what the run build does.

@vlsi
Copy link
Author

vlsi commented Sep 13, 2020

Thanks for the clarification.

As tool-cache is not reused across GitHub runners, it makes little sense to cache it into the tool-cache, so I close the issue as there's nothing to do :-(

It looks like the way to go is to solve gradle/gradle#13982 somehow (e.g. use classpath-only jar instead of a full-blown jar)

@vlsi vlsi closed this as completed Sep 13, 2020
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

No branches or pull requests

2 participants