Rename common to android
Rename the "common" package to "android", because common is too
generic. Also removes all android.Android naming stutter.
Ran:
gomvpkg -from 'android/soong/common' -to 'android/soong/android'
gorename -from '"android/soong/android".AndroidModuleContext' -to 'ModuleContext'
gorename -from '"android/soong/android".AndroidBaseContext' -to 'BaseContext'
gorename -from '"android/soong/android".AndroidModuleBase' -to 'ModuleBase'
gorename -from '"android/soong/android".AndroidBottomUpMutatorContext' -to 'BottomUpMutatorContext'
gorename -from '"android/soong/android".AndroidTopDownMutatorContext' -to 'TopDownMutatorContext'
gorename -from '"android/soong/android".AndroidModule' -to 'Module'
Change-Id: I3b23590b8ce7c8a1ea1139411d84a53163288da7
diff --git a/java/resources.go b/java/resources.go
index 4f734f2..a4783b8 100644
--- a/java/resources.go
+++ b/java/resources.go
@@ -17,7 +17,7 @@
import (
"path/filepath"
- "android/soong/common"
+ "android/soong/android"
)
var resourceExcludes = []string{
@@ -38,11 +38,11 @@
return false
}
-func ResourceDirsToJarSpecs(ctx common.AndroidModuleContext, resourceDirs, excludeDirs []string) []jarSpec {
+func ResourceDirsToJarSpecs(ctx android.ModuleContext, resourceDirs, excludeDirs []string) []jarSpec {
var excludes []string
for _, exclude := range excludeDirs {
- excludes = append(excludes, common.PathForModuleSrc(ctx, exclude, "**/*").String())
+ excludes = append(excludes, android.PathForModuleSrc(ctx, exclude, "**/*").String())
}
excludes = append(excludes, resourceExcludes...)
@@ -53,14 +53,14 @@
if isStringInSlice(resourceDir, excludeDirs) {
continue
}
- resourceDir := common.PathForModuleSrc(ctx, resourceDir)
+ resourceDir := android.PathForModuleSrc(ctx, resourceDir)
dirs := ctx.Glob("java_resources", resourceDir.String(), nil)
for _, dir := range dirs {
- fileListFile := common.ResPathWithName(ctx, dir, "resources.list")
+ fileListFile := android.ResPathWithName(ctx, dir, "resources.list")
depFile := fileListFile.String() + ".d"
glob := filepath.Join(dir.String(), "**/*")
- common.GlobRule(ctx, glob, excludes, fileListFile.String(), depFile)
+ android.GlobRule(ctx, glob, excludes, fileListFile.String(), depFile)
jarSpecs = append(jarSpecs, jarSpec{fileListFile, dir})
}
}