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 } diff --git a/utils/gradle/utils.go b/utils/gradle/utils.go index 093e941c7..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" @@ -18,7 +17,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 { @@ -44,7 +43,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()) }