Use sub-directory for 'setup-gradle' dist

To prepare for converting the 'dependency-submission' action into Typescript,
we move the 'setup-gradle' entry points and outputs into a sub-directory.
This commit is contained in:
daz
2024-01-28 17:24:38 -07:00
parent a97b588d8e
commit b2288963e8
12 changed files with 162 additions and 160 deletions

View File

@@ -233,9 +233,10 @@ export class GradleStateCache {
}
}
// TODO:DAZ Move this to a utility class
private readResourceFileAsString(...paths: string[]): string {
// Resolving relative to __dirname will allow node to find the resource at runtime
const absolutePath = path.resolve(__dirname, '..', '..', 'sources', 'src', 'resources', ...paths)
const absolutePath = path.resolve(__dirname, '..', '..', '..', 'sources', 'src', 'resources', ...paths)
return fs.readFileSync(absolutePath, 'utf8')
}

View File

@@ -1,10 +1,10 @@
import * as core from '@actions/core'
import * as setupGradle from './setup-gradle'
import * as execution from './execution'
import * as provisioner from './provision'
import * as layout from './repository-layout'
import * as params from './input-params'
import * as setupGradle from '../setup-gradle'
import * as execution from '../execution'
import * as provisioner from '../provision'
import * as layout from '../repository-layout'
import * as params from '../input-params'
/**
* The main entry point for the action, called by Github Actions for the step.

View File

@@ -1,6 +1,6 @@
import * as core from '@actions/core'
import * as setupGradle from './setup-gradle'
import {PostActionJobFailure} from './errors'
import * as setupGradle from '../setup-gradle'
import {PostActionJobFailure} from '../errors'
// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
// @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to