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

Support Gradle args with spaces #848

Closed
Closed
Show file tree
Hide file tree
Changes from 3 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
5 changes: 2 additions & 3 deletions utils/gradle/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand All @@ -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())
}

Expand Down