Skip to content

Instantly share code, notes, and snippets.

@andresvia
Last active July 9, 2018 21:02
Show Gist options
  • Save andresvia/0c04fad2d437fbf4eb6c2f7f713af8cd to your computer and use it in GitHub Desktop.
Save andresvia/0c04fad2d437fbf4eb6c2f7f713af8cd to your computer and use it in GitHub Desktop.
gogradle-232
# w: /tmp/gogradle-232
gradle clean build

> Configure project :
Found go 1.10.3 in /Users/andres/.gimme/versions/go1.10.3.darwin.amd64/bin/go, use it.

> Task :prepare
Use project GOPATH: /private/tmp/gogradle-232/.gogradle/project_gopath

> Task :resolveBuildDependencies
Resolving github.com/namsral/flag: commit='LATEST_COMMIT', urls=[https://github.com/namsral/flag.git, [email protected]:namsral/flag.git]

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.8.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1s
8 actionable tasks: 8 executed
# branch.oid 04e41a286910d197872ee7c7e808780ab9b1cde6
# branch.head master
# branch.upstream origin/master
# branch.ab +1 -0
# ?? .gogradle/
# ?? .gradle/
# ?? log.txt
# ?? vendor/

# w: /tmp/gogradle-232
gradle clean build bench

> Configure project :
Found go 1.10.3 in /Users/andres/.gimme/versions/go1.10.3.darwin.amd64/bin/go, use it.

> Task :prepare
Use project GOPATH: /private/tmp/gogradle-232/.gogradle/project_gopath

> Task :resolveBuildDependencies
Resolving github.com/namsral/flag: commit='LATEST_COMMIT', urls=[https://github.com/namsral/flag.git, [email protected]:namsral/flag.git]
main.go:5:2: cannot find package "github.com/namsral/flag" in any of:
        /Users/andres/.gimme/versions/go1.10.3.darwin.amd64/src/github.com/namsral/flag (from $GOROOT)
        /private/tmp/gogradle-232/.gogradle/project_gopath/src/github.com/namsral/flag (from $GOPATH)

> Task :bench FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bench'.
> Build failed due to return code 1 of:
  Command:
   /Users/andres/.gimme/versions/go1.10.3.darwin.amd64/bin/go test -v -bench -cpu=16,8,4,2,1
  Env:
   GOEXE=
   GOPATH=/private/tmp/gogradle-232/.gogradle/project_gopath
   GOROOT=/Users/andres/.gimme/versions/go1.10.3.darwin.amd64
   GOOS=darwin
   GOARCH=amd64

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.8.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 1s
9 actionable tasks: 9 executed
# branch.oid 04e41a286910d197872ee7c7e808780ab9b1cde6
# branch.head master
# branch.upstream origin/master
# branch.ab +1 -0
# ?? .gogradle/
# ?? .gradle/
# ?? log.txt
# ?? vendor/

# w: /tmp/gogradle-232
plugins {
id "com.github.blindpirate.gogradle" version "0.9.2"
}
golang {
goVersion = "1.10.3"
packagePath = "gogradle-232"
}
build {
targetPlatform = ["linux-amd64"]
}
task bench(type: com.github.blindpirate.gogradle.Go) {
dependsOn vendor
go "test -v -bench -cpu=16,8,4,2,1"
}
build.dependsOn cover
package main
import (
"fmt"
"github.com/namsral/flag"
)
func main() {
var name string
flag.StringVar(&name, "name", "world", "name")
flag.Parse()
fmt.Printf("hello %s", name)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment