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/gen.go b/java/gen.go
index 51f9959..57c4ba2 100644
--- a/java/gen.go
+++ b/java/gen.go
@@ -21,7 +21,7 @@
import (
"github.com/google/blueprint"
- "android/soong/common"
+ "android/soong/android"
)
func init() {
@@ -56,11 +56,11 @@
})
)
-func genAidl(ctx common.AndroidModuleContext, aidlFile common.Path, aidlFlags string) common.Path {
- javaFile := common.GenPathWithExt(ctx, aidlFile, "java")
+func genAidl(ctx android.ModuleContext, aidlFile android.Path, aidlFlags string) android.Path {
+ javaFile := android.GenPathWithExt(ctx, aidlFile, "java")
depFile := javaFile.String() + ".d"
- ctx.ModuleBuild(pctx, common.ModuleBuildParams{
+ ctx.ModuleBuild(pctx, android.ModuleBuildParams{
Rule: aidl,
Output: javaFile,
Input: aidlFile,
@@ -73,10 +73,10 @@
return javaFile
}
-func genLogtags(ctx common.AndroidModuleContext, logtagsFile common.Path) common.Path {
- javaFile := common.GenPathWithExt(ctx, logtagsFile, "java")
+func genLogtags(ctx android.ModuleContext, logtagsFile android.Path) android.Path {
+ javaFile := android.GenPathWithExt(ctx, logtagsFile, "java")
- ctx.ModuleBuild(pctx, common.ModuleBuildParams{
+ ctx.ModuleBuild(pctx, android.ModuleBuildParams{
Rule: logtags,
Output: javaFile,
Input: logtagsFile,
@@ -85,8 +85,8 @@
return javaFile
}
-func (j *javaBase) genSources(ctx common.AndroidModuleContext, srcFiles common.Paths,
- flags javaBuilderFlags) common.Paths {
+func (j *javaBase) genSources(ctx android.ModuleContext, srcFiles android.Paths,
+ flags javaBuilderFlags) android.Paths {
for i, srcFile := range srcFiles {
switch srcFile.Ext() {
@@ -108,13 +108,13 @@
}
type logtagsProducer interface {
- logtags() common.Paths
+ logtags() android.Paths
}
type logtagsSingleton struct{}
func (l *logtagsSingleton) GenerateBuildActions(ctx blueprint.SingletonContext) {
- var allLogtags common.Paths
+ var allLogtags android.Paths
ctx.VisitAllModules(func(module blueprint.Module) {
if logtags, ok := module.(logtagsProducer); ok {
allLogtags = append(allLogtags, logtags.logtags()...)