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/app_builder.go b/java/app_builder.go
index 2a47519..d8f2571 100644
--- a/java/app_builder.go
+++ b/java/app_builder.go
@@ -23,7 +23,7 @@
"github.com/google/blueprint"
- "android/soong/common"
+ "android/soong/android"
)
var (
@@ -79,16 +79,16 @@
pctx.HostJavaToolVariable("signapkCmd", "signapk.jar")
}
-func CreateResourceJavaFiles(ctx common.AndroidModuleContext, flags []string,
- deps common.Paths) (common.Path, common.Path, common.Path) {
- javaDir := common.PathForModuleGen(ctx, "R")
- javaFileList := common.PathForModuleOut(ctx, "R.filelist")
- publicResourcesFile := common.PathForModuleOut(ctx, "public_resources.xml")
- proguardOptionsFile := common.PathForModuleOut(ctx, "proguard.options")
+func CreateResourceJavaFiles(ctx android.ModuleContext, flags []string,
+ deps android.Paths) (android.Path, android.Path, android.Path) {
+ javaDir := android.PathForModuleGen(ctx, "R")
+ javaFileList := android.PathForModuleOut(ctx, "R.filelist")
+ publicResourcesFile := android.PathForModuleOut(ctx, "public_resources.xml")
+ proguardOptionsFile := android.PathForModuleOut(ctx, "proguard.options")
- ctx.ModuleBuild(pctx, common.ModuleBuildParams{
+ ctx.ModuleBuild(pctx, android.ModuleBuildParams{
Rule: aaptCreateResourceJavaFile,
- Outputs: common.WritablePaths{publicResourcesFile, proguardOptionsFile, javaFileList},
+ Outputs: android.WritablePaths{publicResourcesFile, proguardOptionsFile, javaFileList},
Implicits: deps,
Args: map[string]string{
"aaptFlags": strings.Join(flags, " "),
@@ -102,10 +102,10 @@
return publicResourcesFile, proguardOptionsFile, javaFileList
}
-func CreateExportPackage(ctx common.AndroidModuleContext, flags []string, deps common.Paths) common.ModuleOutPath {
- outputFile := common.PathForModuleOut(ctx, "package-export.apk")
+func CreateExportPackage(ctx android.ModuleContext, flags []string, deps android.Paths) android.ModuleOutPath {
+ outputFile := android.PathForModuleOut(ctx, "package-export.apk")
- ctx.ModuleBuild(pctx, common.ModuleBuildParams{
+ ctx.ModuleBuild(pctx, android.ModuleBuildParams{
Rule: aaptCreateAssetsPackage,
Output: outputFile,
Implicits: deps,
@@ -117,12 +117,12 @@
return outputFile
}
-func CreateAppPackage(ctx common.AndroidModuleContext, flags []string, jarFile common.Path,
- certificates []string) common.Path {
+func CreateAppPackage(ctx android.ModuleContext, flags []string, jarFile android.Path,
+ certificates []string) android.Path {
- resourceApk := common.PathForModuleOut(ctx, "resources.apk")
+ resourceApk := android.PathForModuleOut(ctx, "resources.apk")
- ctx.ModuleBuild(pctx, common.ModuleBuildParams{
+ ctx.ModuleBuild(pctx, android.ModuleBuildParams{
Rule: aaptAddResources,
Output: resourceApk,
Input: jarFile,
@@ -131,14 +131,14 @@
},
})
- outputFile := common.PathForModuleOut(ctx, "package.apk")
+ outputFile := android.PathForModuleOut(ctx, "package.apk")
var certificateArgs []string
for _, c := range certificates {
certificateArgs = append(certificateArgs, c+".x509.pem", c+".pk8")
}
- ctx.ModuleBuild(pctx, common.ModuleBuildParams{
+ ctx.ModuleBuild(pctx, android.ModuleBuildParams{
Rule: signapk,
Output: outputFile,
Input: resourceApk,