Support moving sources in srcjars in soong_zip

Add a -srcjar argument to soong_zip that causes it to read the
package statement of each .java file and use that to place the
source file at a path that matches the package.

Test: jar_test.go, zip_test.go
Change-Id: I36017e42445ba3b0a82a10a8d81e8ac0cca096f2
This commit is contained in:
Colin Cross
2019-06-17 14:12:41 -07:00
parent 5d7409ba0f
commit 9cb51dbc0b
6 changed files with 445 additions and 37 deletions

View File

@@ -18,8 +18,10 @@ bootstrap_go_package {
srcs: [
"jar.go",
],
testSrcs: [
"jar_test.go",
],
deps: [
"android-archive-zip",
],
}