Move partner androidmk and bpfix files to match their package path

Using a gomod-aware editor with build/soong requires that files
in build/soong can be mapped to the android/soong package path.
Move the partner androidmk and bpfix files such that their path
matches the package path when the android/soong package prefix is
replaced with the build/soong path prefix.

Test: go test ./...
Test: m bpfix androidmk partner_bpfix partner_androidmk
Change-Id: Ic7f7aad9e5eb9178eef0383f0b37e4fb93ce8314
This commit is contained in:
Colin Cross 2019-11-08 14:17:49 -08:00
parent 2d5ce8538b
commit ce23942f3c
8 changed files with 19 additions and 21 deletions

View file

@ -28,9 +28,9 @@ blueprint_go_binary {
bootstrap_go_package {
name: "bpfix-cmd",
pkgPath: "android/soong/bpfix/bpfix/cmd",
pkgPath: "android/soong/bpfix/cmd_lib",
srcs: [
"cmd-lib/bpfix.go",
"cmd_lib/bpfix.go",
],
deps: [
"bpfix-lib",

View file

@ -16,10 +16,8 @@
package main
import (
"android/soong/bpfix/bpfix/cmd"
)
import "android/soong/bpfix/cmd_lib"
func main() {
cmd.Run()
cmd_lib.Run()
}

View file

@ -16,7 +16,7 @@
// TODO(jeffrygaston) should this file be consolidated with bpfmt.go?
package cmd
package cmd_lib
import (
"bytes"

View file

@ -1,4 +1,4 @@
// Copyright 2015 Google Inc. All rights reserved.
// Copyright 2019 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -19,31 +19,31 @@
blueprint_go_binary {
name: "partner_androidmk",
srcs: [
"partner_androidmk/androidmk.go",
"androidmk/androidmk.go",
],
testSrcs: [
"partner_androidmk/androidmk_test.go",
"androidmk/androidmk_test.go",
],
deps: [
"androidmk-lib",
"partner_bpfix_extensions",
"partner-bpfix-extensions",
],
}
blueprint_go_binary {
name: "partner_bpfix",
srcs: [
"partner_bpfix/bpfix.go",
"bpfix/bpfix.go",
],
deps: [
"bpfix-cmd",
"partner_bpfix_extensions",
"partner-bpfix-extensions",
],
}
bootstrap_go_package {
name: "partner_bpfix_extensions",
pkgPath: "partner/android/bpfix/extensions",
srcs: ["fixes/headers.go"],
name: "partner-bpfix-extensions",
pkgPath: "android/soong/partner/bpfix/extensions",
srcs: ["bpfix/extensions/headers.go"],
deps: ["bpfix-lib"],
}

View file

@ -23,7 +23,7 @@ import (
"android/soong/androidmk/androidmk"
_ "partner/android/bpfix/extensions"
_ "android/soong/partner/bpfix/extensions"
)
var usage = func() {

View file

@ -23,7 +23,7 @@ import (
"android/soong/androidmk/androidmk"
"android/soong/bpfix/bpfix"
_ "partner/android/bpfix/extensions"
_ "android/soong/partner/bpfix/extensions"
)
var testCases = []struct {

View file

@ -17,11 +17,11 @@
package main
import (
"android/soong/bpfix/bpfix/cmd"
"android/soong/bpfix/cmd_lib"
_ "partner/android/bpfix/extensions"
_ "android/soong/partner/bpfix/extensions"
)
func main() {
cmd.Run()
cmd_lib.Run()
}