mirror of
https://github.com/gradle/actions.git
synced 2025-12-08 17:15:46 +08:00
Emit deprecation warnings for derecated inputs
- Adds an upgrade-guide to assist with resolving deprecations - Emit a warning when deprecated features are used - List all deprecated features in Job Summary and link to upgrade guide
This commit is contained in:
@@ -4,6 +4,7 @@ import * as setupGradle from '../setup-gradle'
|
||||
import * as gradle from '../execution/gradle'
|
||||
import * as dependencyGraph from '../dependency-graph'
|
||||
import {BuildScanConfig, CacheConfig, DependencyGraphConfig, GradleExecutionConfig} from '../input-params'
|
||||
import {saveDeprecationState} from '../deprecation-collector'
|
||||
|
||||
/**
|
||||
* The main entry point for the action, called by Github Actions for the step.
|
||||
@@ -22,6 +23,8 @@ export async function run(): Promise<void> {
|
||||
config.getBuildRootDirectory(),
|
||||
config.getArguments()
|
||||
)
|
||||
|
||||
saveDeprecationState()
|
||||
} catch (error) {
|
||||
core.setFailed(String(error))
|
||||
if (error instanceof Error && error.stack) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import * as dependencyGraph from '../dependency-graph'
|
||||
|
||||
import {CacheConfig, DependencyGraphConfig, SummaryConfig} from '../input-params'
|
||||
import {PostActionJobFailure} from '../errors'
|
||||
import {emitDeprecationWarnings, restoreDeprecationState} from '../deprecation-collector'
|
||||
|
||||
// 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
|
||||
@@ -15,6 +16,9 @@ process.on('uncaughtException', e => handleFailure(e))
|
||||
*/
|
||||
export async function run(): Promise<void> {
|
||||
try {
|
||||
restoreDeprecationState()
|
||||
emitDeprecationWarnings()
|
||||
|
||||
if (await setupGradle.complete(new CacheConfig(), new SummaryConfig())) {
|
||||
// Only submit the dependency graphs once per job
|
||||
await dependencyGraph.complete(new DependencyGraphConfig())
|
||||
|
||||
Reference in New Issue
Block a user