Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to run gradle command with space #2143

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
return err
}
printDeploymentView := log.IsStdErrTerminal()
gradleCmd := gradle.NewGradleCommand().SetConfiguration(buildConfiguration).SetTasks(strings.Join(filteredGradleArgs, " ")).SetConfigPath(configFilePath).SetThreads(threads).SetDetailedSummary(detailedSummary || printDeploymentView).SetXrayScan(xrayScan).SetScanOutputFormat(scanOutputFormat)
gradleCmd := gradle.NewGradleCommand().SetConfiguration(buildConfiguration).SetTasks(filteredGradleArgs).SetConfigPath(configFilePath).SetThreads(threads).SetDetailedSummary(detailedSummary || printDeploymentView).SetXrayScan(xrayScan).SetScanOutputFormat(scanOutputFormat)

Check failure on line 476 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Lint ubuntu

cannot use filteredGradleArgs (variable of type []string) as string value in argument to gradle.NewGradleCommand().SetConfiguration(buildConfiguration).SetTasks

Check failure on line 476 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Lint windows

cannot use filteredGradleArgs (variable of type []string) as string value in argument to gradle.NewGradleCommand().SetConfiguration(buildConfiguration).SetTasks

Check failure on line 476 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Lint macos

cannot use filteredGradleArgs (variable of type []string) as string value in argument to gradle.NewGradleCommand().SetConfiguration(buildConfiguration).SetTasks

Check failure on line 476 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Go-Sec ubuntu-latest

cannot use filteredGradleArgs (variable of type []string) as string value in argument to gradle.NewGradleCommand().SetConfiguration(buildConfiguration).SetTasks

Check failure on line 476 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Static Check ubuntu-latest

cannot use filteredGradleArgs (variable of type []string) as string value in argument to gradle.NewGradleCommand().SetConfiguration(buildConfiguration).SetTasks (typecheck)

Check failure on line 476 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Static Check ubuntu-latest

cannot use filteredGradleArgs (variable of type []string) as string value in argument to gradle.NewGradleCommand().SetConfiguration(buildConfiguration).SetTasks) (typecheck)

Check failure on line 476 in buildtools/cli.go

View workflow job for this annotation

GitHub Actions / Static Check ubuntu-latest

cannot use filteredGradleArgs (variable of type []string) as string value in argument to gradle.NewGradleCommand().SetConfiguration(buildConfiguration).SetTasks) (typecheck)
err = commands.Exec(gradleCmd)
result := gradleCmd.Result()
defer cliutils.CleanupResult(result, &err)
Expand Down
4 changes: 2 additions & 2 deletions gradle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

// Test gradle with detailed summary without buildinfo props.
filteredGradleArgs := []string{"clean artifactoryPublish", "-b" + buildGradlePath}
gradleCmd := gradle.NewGradleCommand().SetConfiguration(new(utils.BuildConfiguration)).SetTasks(strings.Join(filteredGradleArgs, " ")).SetConfigPath(filepath.Join(destPath, "gradle.yaml")).SetDetailedSummary(true)
gradleCmd := gradle.NewGradleCommand().SetConfiguration(new(utils.BuildConfiguration)).SetTasks(filteredGradleArgs).SetConfigPath(filepath.Join(destPath, "gradle.yaml")).SetDetailedSummary(true)

Check failure on line 115 in gradle_test.go

View workflow job for this annotation

GitHub Actions / Static Check ubuntu-latest

cannot use filteredGradleArgs (variable of type []string) as string value in argument to gradle.NewGradleCommand().SetConfiguration(new(utils.BuildConfiguration)).SetTasks (typecheck)
assert.NoError(t, commands.Exec(gradleCmd))
// Validate sha256
assert.NotNil(t, gradleCmd.Result())
Expand All @@ -121,7 +121,7 @@
}

// Test gradle with detailed summary + buildinfo.
gradleCmd = gradle.NewGradleCommand().SetConfiguration(utils.NewBuildConfiguration(tests.GradleBuildName, buildNumber, "", "")).SetTasks(strings.Join(filteredGradleArgs, " ")).SetConfigPath(filepath.Join(destPath, "gradle.yaml")).SetDetailedSummary(true)
gradleCmd = gradle.NewGradleCommand().SetConfiguration(utils.NewBuildConfiguration(tests.GradleBuildName, buildNumber, "", "")).SetTasks(filteredGradleArgs).SetConfigPath(filepath.Join(destPath, "gradle.yaml")).SetDetailedSummary(true)

Check failure on line 124 in gradle_test.go

View workflow job for this annotation

GitHub Actions / Static Check ubuntu-latest

cannot use filteredGradleArgs (variable of type []string) as string value in argument to gradle.NewGradleCommand().SetConfiguration(utils.NewBuildConfiguration(tests.GradleBuildName, buildNumber, "", "")).SetTasks (typecheck)
assert.NoError(t, commands.Exec(gradleCmd))
// Validate sha256
tests.VerifySha256DetailedSummaryFromResult(t, gradleCmd.Result())
Expand Down
Loading