Add build files for submodules
This commit is contained in:
16
BUILD
16
BUILD
@ -29,3 +29,19 @@ go_binary(
|
|||||||
"@bare//:bare",
|
"@bare//:bare",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
go_binary(
|
||||||
|
name ="subbare",
|
||||||
|
srcs = [ "subbare.go" ],
|
||||||
|
deps = [
|
||||||
|
"//submodule/src:bare",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
go_binary(
|
||||||
|
name ="subremote",
|
||||||
|
srcs = [ "subremote.go" ],
|
||||||
|
deps = [
|
||||||
|
"//submodule/src/remote",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
10
subbare.go
Normal file
10
subbare.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/laramiel/bazel-example-golang-bare/bare"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println("Hello", local.World())
|
||||||
|
}
|
9
submodule/src/BUILD
Normal file
9
submodule/src/BUILD
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
load("@bazel_tools//tools/build_rules/go:def.bzl", "go_prefix", "go_library")
|
||||||
|
|
||||||
|
go_prefix("github.com/laramiel/bazel-example-golang-bare/")
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "bare",
|
||||||
|
srcs = [ "bare/bare.go" ],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
10
subremote.go
Normal file
10
subremote.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/laramiel/bazel-example-golang-remote/remote"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println("Hello", remote.World())
|
||||||
|
}
|
Reference in New Issue
Block a user