mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-07-12 10:15:51 +02:00
Allow source files to contain lines up to 120 characters
This avoids excessive line-feeds when reformatting code to 80 char lines.
This commit is contained in:
parent
e3ada7e5c2
commit
063fc6a872
8 changed files with 60 additions and 197 deletions
18
src/main.ts
18
src/main.ts
|
@ -18,10 +18,7 @@ export async function run(): Promise<void> {
|
|||
const args: string[] = parseCommandLineArguments()
|
||||
|
||||
const result = await execution.execute(
|
||||
await resolveGradleExecutable(
|
||||
workspaceDirectory,
|
||||
buildRootDirectory
|
||||
),
|
||||
await resolveGradleExecutable(workspaceDirectory, buildRootDirectory),
|
||||
buildRootDirectory,
|
||||
args
|
||||
)
|
||||
|
@ -34,9 +31,7 @@ export async function run(): Promise<void> {
|
|||
if (result.buildScanUrl) {
|
||||
core.setFailed(`Gradle build failed: ${result.buildScanUrl}`)
|
||||
} else {
|
||||
core.setFailed(
|
||||
`Gradle build failed: process exited with status ${result.status}`
|
||||
)
|
||||
core.setFailed(`Gradle build failed: process exited with status ${result.status}`)
|
||||
}
|
||||
} else {
|
||||
if (result.buildScanUrl) {
|
||||
|
@ -53,10 +48,7 @@ export async function run(): Promise<void> {
|
|||
|
||||
run()
|
||||
|
||||
async function resolveGradleExecutable(
|
||||
workspaceDirectory: string,
|
||||
buildRootDirectory: string
|
||||
): Promise<string> {
|
||||
async function resolveGradleExecutable(workspaceDirectory: string, buildRootDirectory: string): Promise<string> {
|
||||
const gradleVersion = core.getInput('gradle-version')
|
||||
if (gradleVersion !== '' && gradleVersion !== 'wrapper') {
|
||||
return path.resolve(await provision.gradleVersion(gradleVersion))
|
||||
|
@ -73,9 +65,7 @@ async function resolveGradleExecutable(
|
|||
function resolveBuildRootDirectory(baseDirectory: string): string {
|
||||
const buildRootDirectory = core.getInput('build-root-directory')
|
||||
const resolvedBuildRootDirectory =
|
||||
buildRootDirectory === ''
|
||||
? path.resolve(baseDirectory)
|
||||
: path.resolve(baseDirectory, buildRootDirectory)
|
||||
buildRootDirectory === '' ? path.resolve(baseDirectory) : path.resolve(baseDirectory, buildRootDirectory)
|
||||
return resolvedBuildRootDirectory
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue