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

Fix/gradle args with spaces #831

Closed
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
4 changes: 2 additions & 2 deletions artifactory/commands/gradle/gradle.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

type GradleCommand struct {
tasks string
tasks []string
configPath string
configuration *utils.BuildConfiguration
serverDetails *config.ServerDetails
Expand Down Expand Up @@ -179,7 +179,7 @@ func (gc *GradleCommand) SetConfigPath(configPath string) *GradleCommand {
return gc
}

func (gc *GradleCommand) SetTasks(tasks string) *GradleCommand {
func (gc *GradleCommand) SetTasks(tasks []string) *GradleCommand {
gc.tasks = tasks
return gc
}
Expand Down
4 changes: 2 additions & 2 deletions utils/gradle/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const (
useWrapper = "usewrapper"
)

func RunGradle(vConfig *viper.Viper, tasks, deployableArtifactsFile string, configuration *utils.BuildConfiguration, threads int, disableDeploy bool) error {
func RunGradle(vConfig *viper.Viper, tasks []string, deployableArtifactsFile string, configuration *utils.BuildConfiguration, threads int, disableDeploy bool) error {
buildInfoService := utils.CreateBuildInfoService()
buildName, err := configuration.GetBuildName()
if err != nil {
Expand All @@ -44,7 +44,7 @@ func RunGradle(vConfig *viper.Viper, tasks, deployableArtifactsFile string, conf
if err != nil {
return err
}
gradleModule.SetExtractorDetails(dependencyLocalPath, filepath.Join(coreutils.GetCliPersistentTempDirPath(), utils.PropertiesTempPath), strings.Split(tasks, " "), wrapper, plugin, utils.DownloadExtractor, props)
gradleModule.SetExtractorDetails(dependencyLocalPath, filepath.Join(coreutils.GetCliPersistentTempDirPath(), utils.PropertiesTempPath), tasks, wrapper, plugin, utils.DownloadExtractor, props)
return coreutils.ConvertExitCodeError(gradleModule.CalcDependencies())
}

Expand Down
Loading