mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-05 07:46:11 +02:00
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
This commit is contained in:
parent
d61e5be06a
commit
e3ada7e5c2
4 changed files with 19 additions and 13 deletions
|
@ -84,8 +84,8 @@ export class GradleUserHomeCache extends AbstractCache {
|
|||
}
|
||||
|
||||
private removeExcludedPaths(): void {
|
||||
const rawPaths: string[] = JSON.parse(
|
||||
core.getInput(EXCLUDE_PATHS_PARAMETER)
|
||||
const rawPaths: string[] = core.getMultilineInput(
|
||||
EXCLUDE_PATHS_PARAMETER
|
||||
)
|
||||
const resolvedPaths = rawPaths.map(x =>
|
||||
path.resolve(this.gradleUserHome, x)
|
||||
|
@ -193,8 +193,8 @@ export class GradleUserHomeCache extends AbstractCache {
|
|||
}
|
||||
|
||||
protected getCachePath(): string[] {
|
||||
const rawPaths: string[] = JSON.parse(
|
||||
core.getInput(INCLUDE_PATHS_PARAMETER)
|
||||
const rawPaths: string[] = core.getMultilineInput(
|
||||
INCLUDE_PATHS_PARAMETER
|
||||
)
|
||||
rawPaths.push(META_FILE_DIR)
|
||||
const resolvedPaths = rawPaths.map(x => this.resolveCachePath(x))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue