From bc96d7b137ef0f6544c71c446ba6516c938ea26e Mon Sep 17 00:00:00 2001 From: keegan morrissey Date: Mon, 19 Jun 2023 07:47:58 -0500 Subject: [PATCH 1/4] 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/4] 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/4] 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()) } From 28f90a7d6f43c16d6acbcb8c86937c282eb17274 Mon Sep 17 00:00:00 2001 From: keegan morrissey Date: Tue, 27 Jun 2023 07:46:12 -0500 Subject: [PATCH 4/4] removing unused import --- utils/gradle/utils.go | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/gradle/utils.go b/utils/gradle/utils.go index a938e9ae0..180a52a62 100644 --- a/utils/gradle/utils.go +++ b/utils/gradle/utils.go @@ -3,7 +3,6 @@ package gradleutils import ( "fmt" "path/filepath" - "strings" "github.com/jfrog/build-info-go/build" "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils"