diff options
author | Dan Willemsen <dwillemsen@google.com> | 2018-05-04 19:05:02 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2018-05-05 13:06:40 -0700 |
commit | 75dec2291b73995ca4d4ddb1b828dfce7f959043 (patch) | |
tree | 3167c489a6596b4c2b574d76a5172ed4ff6f2240 /bpfix | |
parent | 11f12db82350c1207326f145aa31ac3d1c597852 (diff) | |
download | build_soong-75dec2291b73995ca4d4ddb1b828dfce7f959043.tar.gz build_soong-75dec2291b73995ca4d4ddb1b828dfce7f959043.tar.bz2 build_soong-75dec2291b73995ca4d4ddb1b828dfce7f959043.zip |
Fix androidmk converting cc libraries
The java library rewrites should only happen for java modules, not cc
modules.
Test: Ran androidmk on a number of Android.mk files
Change-Id: Ife2cfb5a69d7db37216671f08317033b99fcd3a1
Diffstat (limited to 'bpfix')
-rw-r--r-- | bpfix/bpfix/bpfix.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bpfix/bpfix/bpfix.go b/bpfix/bpfix/bpfix.go index e4d4e34e..d5c318c5 100644 --- a/bpfix/bpfix/bpfix.go +++ b/bpfix/bpfix/bpfix.go @@ -22,6 +22,7 @@ import ( "fmt" "io" "path/filepath" + "strings" "github.com/google/blueprint/parser" ) @@ -220,6 +221,10 @@ func (f *Fixer) rewriteIncorrectAndroidmkAndroidLibraries() error { continue } + if !strings.HasPrefix(mod.Type, "java_") && !strings.HasPrefix(mod.Type, "android_") { + continue + } + hasAndroidLibraries := hasNonEmptyLiteralListProperty(mod, "android_libs") hasStaticAndroidLibraries := hasNonEmptyLiteralListProperty(mod, "android_static_libs") hasResourceDirs := hasNonEmptyLiteralListProperty(mod, "resource_dirs") |