MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/buildpacks / GradleCmd

Function GradleCmd

pkg/java/java.go:207–217  ·  view source on GitHub ↗

GradleCmd returns the command that should be used to invoke gradle for this build.

(ctx *gcp.Context)

Source from the content-addressed store, hash-verified

205
206// GradleCmd returns the command that should be used to invoke gradle for this build.
207func GradleCmd(ctx *gcp.Context) (string, error) {
208 exists, err := ctx.FileExists("gradlew")
209 if err != nil {
210 return "", err
211 }
212 // If this project has the Gradle Wrapper, we should use it
213 if exists {
214 return "./gradlew", nil
215 }
216 return "gradle", nil
217}

Callers 1

gradleClasspathFunction · 0.92

Calls 1

FileExistsMethod · 0.80

Tested by

no test coverage detected