Commit graph

36 commits

Author SHA1 Message Date
Daz DeBoer
e3ada7e5c2
Use multiline input parameters instead of JSON input
The `gradle-home-cache-includes` and `gradle-home-cache-excludes` parameters were initially implemented
as JSON string inputs. This makes these inputs non-idiomatic and easier to get wrong.

This change converts them to multi-line input parameters.

Fixes #106
2021-10-29 07:29:57 -06:00
Daz DeBoer
27f2dc276c
Rename and document parameters for clarity
- cache-paths -> gradle-home-cache-includes
- cache-exclude-paths -> gradle-home-cache-excludes
- CACHE_DEBUG_ENABLED -> GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED
2021-10-27 16:05:07 -06:00
Daz DeBoer
69453dbfc5
Include 'kotlin-dsl' as a cache-artifact-bundle 2021-10-21 11:13:09 -06:00
Daz DeBoer
1113cb87cb
Allow cache-exclude-paths to be configured for action
All excluded paths are deleted prior to caching the Gradle User Home.
2021-10-21 11:13:09 -06:00
Daz DeBoer
9c95294209
Allow cache-paths to be set via action config 2021-10-21 11:13:08 -06:00
Daz DeBoer
cb6a0acca4
Use precise matching for artifact bundles
This should fix the warnings issued when saving artifact bundles.
2021-10-16 09:49:15 -06:00
Daz DeBoer
709ded51a5
Treat directory for instrumented jar as single artifact
Leaving the `.lock` and `.receipt` files lying around was causing
issues when the actual jar files were not restored. Now the entire
directory will either be missing, or completely restored.
2021-10-15 14:54:29 -06:00
Daz DeBoer
da64595ccc
Make artifact bundle definitions an input parameter 2021-10-15 13:21:13 -06:00
Daz DeBoer
d1ab42cddf
Document support for multi-line arguments
Fixes #88
2021-10-15 12:24:41 -06:00
Daz DeBoer
bbe1574290
Add some TODOs to the code for future reference 2021-09-13 11:50:07 -06:00
Daz DeBoer
3390540145
Simplify setting caches to disabled or read-only 2021-09-13 11:04:42 -06:00
Daz DeBoer
9b3abaad52
Use current matrix values for workflow job context 2021-09-07 16:26:28 -06:00
Daz DeBoer
4d37378696
Consolidate cache-enabled options 2021-09-05 21:38:33 -06:00
Daz DeBoer
6fca6b3929
Add support for read-only caching in v2 2021-08-26 17:25:49 -06:00
Daz DeBoer
d9cc0aeccf
Remove old caching code 2021-08-24 12:54:21 -06:00
Daz DeBoer
5340f6e816
Add cache for project .gradle dir
- For now, this is limited to configuration-cache directory
2021-08-24 12:52:51 -06:00
Daz DeBoer
c211be411e
Use monolithic cache for Gradle User Home
- Do not restore cache when GUH exists
- Include RUNNER_OS in the cache key
- Do not save cache on exact hit
- Only save cache in the final post action
- Log before saving cache
2021-08-24 12:52:51 -06:00
Daz DeBoer
d432f2086c
Provide a better description for the action 2021-08-22 14:48:38 -06:00
Daz DeBoer
a693ccda4b
Allow use of caches 'read-only'
To avoid evicting useful entries, some pipeline may benefit from using existing
cache entries without writing any changes back to the cache.

Fixes #62
2021-08-22 14:28:34 -06:00
Daz DeBoer
3f3947669a
Rename action from "Gradle Command" to "Gradle Build Action" 2021-08-17 09:36:14 -06:00
Daz DeBoer
01bfa29846
Update metadata and docs for repository move/rename
Fixes #60
2021-08-07 16:13:35 -07:00
Daz DeBoer
02d4f46354
Use core functionality to access action inputs
- Specify default values in action.yaml definition where appropriate
- Replace custom methods with core functions:
  -  getInputBoolean() with core.getBooleanInput()
  - inputOrNull() with core.getInput()
  - inputArrayOrNull() with core.getMultilineInput()
- Remove github-utils.js
2021-07-26 14:54:59 -06:00
Daz DeBoer
5423935c9b
Deprecate the 'wrapper-directory' input and recommend 'gradle-executable' instead
Use of a wrapper in a non-standard directory is uncommon, and is effectively handled
by referencing the `gradlew` script as the `gradle-executable`.
2021-07-26 14:54:59 -06:00
Daz DeBoer
33e91b639d
Cache Gradle distributions downloaded for a particular version (#58)
- Cache is separate from (but similar to) the wrapper distribution cache
- New 'distributions-cache-enabled' flag controls caching of all downloaded distributions
  (including wrapper distributions)
- Deprecated the 'wrapper-cache-enabled' flag for removal in v2
2021-07-08 12:22:48 -06:00
Paul Merlin
4c7d97cca4 Add caching of Gradle build configuration cache 2020-06-15 15:58:20 +02:00
Paul Merlin
2afa86ca9f Disable dependencies cache by default 2020-06-15 15:57:09 +02:00
Paul Merlin
02a8a21e55 Add input to disable wrapper caching 2020-06-15 15:41:09 +02:00
Paul Merlin
3abad5567a Add input to disable dependencies caching altogether 2020-06-15 14:32:54 +02:00
Paul Merlin
7c8cc1a9ef Fix typo 2020-06-15 14:28:57 +02:00
Paul Merlin
053762c1c1 Add input to make the dependencies caching strict 2020-06-15 13:05:36 +02:00
Paul Merlin
95e20daa83 Automatic caching of dependencies
in a best effort manner by default
allowing to specify files to hash for computing the cache key
2020-06-15 13:04:42 +02:00
Paul Merlin
e0644c97f9 Split action, step 2 2020-06-13 13:34:07 +02:00
Paul Merlin
9cc76cdea7 Split action, step 1 2020-06-13 13:30:20 +02:00
Paul Merlin
bc921df1ec Initial impl 2019-09-21 16:01:53 +02:00
Paul Merlin
f4a8f7a81b minor edits & build 2019-09-20 23:23:07 +02:00
Paul Merlin
8ba9907b46 Initial commit 2019-09-20 23:06:59 +02:00