mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
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:
@@ -8,8 +8,8 @@
|
||||
"format": "prettier --write **/*.ts",
|
||||
"format-check": "prettier --check **/*.ts",
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"compile-main": "ncc build src/main.ts --out ../dist/main --source-map --no-source-map-register",
|
||||
"compile-post": "ncc build src/post.ts --out ../dist/post --source-map --no-source-map-register",
|
||||
"compile-setup-gradle-main": "ncc build src/setup-gradle/main.ts --out ../dist/setup-gradle/main --source-map --no-source-map-register",
|
||||
"compile-setup-gradle-post": "ncc build src/setup-gradle/post.ts --out ../dist/setup-gradle/post --source-map --no-source-map-register",
|
||||
"compile": "npm-run-all --parallel compile-*",
|
||||
"check": "npm-run-all --parallel format lint",
|
||||
"test": "jest",
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -59,5 +59,6 @@
|
||||
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
||||
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["node_modules", "**/*.test.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user