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 { bootstrap_go_package {
name: "bpfix-cmd", name: "bpfix-cmd",
pkgPath: "android/soong/bpfix/bpfix/cmd", pkgPath: "android/soong/bpfix/cmd_lib",
srcs: [ srcs: [
"cmd-lib/bpfix.go", "cmd_lib/bpfix.go",
], ],
deps: [ deps: [
"bpfix-lib", "bpfix-lib",

View file

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

View file

@ -16,7 +16,7 @@
// TODO(jeffrygaston) should this file be consolidated with bpfmt.go? // TODO(jeffrygaston) should this file be consolidated with bpfmt.go?
package cmd package cmd_lib
import ( import (
"bytes" "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"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -19,31 +19,31 @@
blueprint_go_binary { blueprint_go_binary {
name: "partner_androidmk", name: "partner_androidmk",
srcs: [ srcs: [
"partner_androidmk/androidmk.go", "androidmk/androidmk.go",
], ],
testSrcs: [ testSrcs: [
"partner_androidmk/androidmk_test.go", "androidmk/androidmk_test.go",
], ],
deps: [ deps: [
"androidmk-lib", "androidmk-lib",
"partner_bpfix_extensions", "partner-bpfix-extensions",
], ],
} }
blueprint_go_binary { blueprint_go_binary {
name: "partner_bpfix", name: "partner_bpfix",
srcs: [ srcs: [
"partner_bpfix/bpfix.go", "bpfix/bpfix.go",
], ],
deps: [ deps: [
"bpfix-cmd", "bpfix-cmd",
"partner_bpfix_extensions", "partner-bpfix-extensions",
], ],
} }
bootstrap_go_package { bootstrap_go_package {
name: "partner_bpfix_extensions", name: "partner-bpfix-extensions",
pkgPath: "partner/android/bpfix/extensions", pkgPath: "android/soong/partner/bpfix/extensions",
srcs: ["fixes/headers.go"], srcs: ["bpfix/extensions/headers.go"],
deps: ["bpfix-lib"], deps: ["bpfix-lib"],
} }

View file

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

View file

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

View file

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