From bc96d7b137ef0f6544c71c446ba6516c938ea26e Mon Sep 17 00:00:00 2001 From: keegan morrissey Date: Mon, 19 Jun 2023 07:47:58 -0500 Subject: [PATCH 1/3] Bugfix - Gradle args with spaces --- artifactory/commands/gradle/gradle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artifactory/commands/gradle/gradle.go b/artifactory/commands/gradle/gradle.go index 376ef3067..334dcafad 100644 --- a/artifactory/commands/gradle/gradle.go +++ b/artifactory/commands/gradle/gradle.go @@ -14,7 +14,7 @@ import ( ) type GradleCommand struct { - tasks string + tasks []string configPath string configuration *utils.BuildConfiguration serverDetails *config.ServerDetails @@ -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 } From 34a17d8cd69d958c6c898d8baeadc8465071998c Mon Sep 17 00:00:00 2001 From: keegan morrissey Date: Mon, 19 Jun 2023 08:08:55 -0500 Subject: [PATCH 2/3] Bugfix - Gradle args with spaces - modifying utils --- utils/gradle/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gradle/utils.go b/utils/gradle/utils.go index 093e941c7..4780a58ef 100644 --- a/utils/gradle/utils.go +++ b/utils/gradle/utils.go @@ -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 { From f4a5611414a03f6454a9ab27e37409b85338784c Mon Sep 17 00:00:00 2001 From: keegan morrissey Date: Mon, 19 Jun 2023 08:24:24 -0500 Subject: [PATCH 3/3] Bugfix - Gradle args with spaces - updating tasks --- utils/gradle/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gradle/utils.go b/utils/gradle/utils.go index 4780a58ef..a938e9ae0 100644 --- a/utils/gradle/utils.go +++ b/utils/gradle/utils.go @@ -44,7 +44,7 @@ func RunGradle(vConfig *viper.Viper, tasks []string, deployableArtifactsFile str 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()) }