Fix go.mod, add go.work to use local versions of the dependent modules.

Test: treehugger, (cd build/soong && go build ./...)
Change-Id: I22fd664b5dcc9f4691c5182fdf0dfe53abc0c584
This commit is contained in:
Sasha Smundak 2022-12-02 15:27:17 -08:00 committed by Alexander Smundak
parent e0598a1cbd
commit 8756ae3702
2 changed files with 24 additions and 17 deletions

22
go.mod
View file

@ -1,21 +1,9 @@
module android/soong
go 1.19
require (
google.golang.org/protobuf v0.0.0
github.com/google/blueprint v0.0.0
prebuilts/bazel/common/proto/analysis_v2 v0.0.0
prebuilts/bazel/common/proto/build v0.0.0 // indirect
github.com/google/blueprint v0.0.0
google.golang.org/protobuf v0.0.0
prebuilts/bazel/common/proto/analysis_v2 v0.0.0
)
replace (
google.golang.org/protobuf v0.0.0 => ../../external/golang-protobuf
github.com/google/blueprint v0.0.0 => ../blueprint
github.com/google/go-cmp v0.5.5 => ../../external/go-cmp
prebuilts/bazel/common/proto/analysis_v2 => ../../prebuilts/bazel/common/proto/analysis_v2
prebuilts/bazel/common/proto/build => ../../prebuilts/bazel/common/proto/build
)
// Indirect deps from golang-protobuf
exclude github.com/golang/protobuf v1.5.0
go 2.0

19
go.work Normal file
View file

@ -0,0 +1,19 @@
go 1.19
use (
.
../../external/go-cmp
../../external/golang-protobuf
../../prebuilts/bazel/common/proto/analysis_v2
../../prebuilts/bazel/common/proto/build
../blueprint
)
replace (
github.com/golang/protobuf v0.0.0 => ../../external/golang-protobuf
github.com/google/blueprint v0.0.0 => ../blueprint
github.com/google/go-cmp v0.0.0 => ../../external/go-cmp
google.golang.org/protobuf v0.0.0 => ../../external/golang-protobuf
prebuilts/bazel/common/proto/analysis_v2 v0.0.0 => ../../prebuilts/bazel/common/proto/analysis_v2
prebuilts/bazel/common/proto/build v0.0.0 => ../../prebuilts/bazel/common/proto/build
)