Merge "Remove InstallBypassMake and ToMakePath" am: f1228f570a
am: a9f335cf5a
am: fd865c6688
am: 8ef2179a6e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1889722 Change-Id: If49c894804c5ca0dfd197ca848ff1c9ac79556f4
This commit is contained in:
@@ -685,7 +685,7 @@ func (r *RuntimeResourceOverlay) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
|
||||
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
||||
entries.SetString("LOCAL_CERTIFICATE", r.certificate.AndroidMkString())
|
||||
entries.SetPath("LOCAL_MODULE_PATH", r.installDir.ToMakePath())
|
||||
entries.SetPath("LOCAL_MODULE_PATH", r.installDir)
|
||||
entries.AddStrings("LOCAL_OVERRIDES_PACKAGES", r.properties.Overrides...)
|
||||
},
|
||||
},
|
||||
|
@@ -488,7 +488,7 @@ func (a *AndroidApp) jniBuildActions(jniLibs []jniLib, ctx android.ModuleContext
|
||||
a.jniLibs = jniLibs
|
||||
if a.shouldEmbedJnis(ctx) {
|
||||
jniJarFile = android.PathForModuleOut(ctx, "jnilibs.zip")
|
||||
a.installPathForJNISymbols = a.installPath(ctx).ToMakePath()
|
||||
a.installPathForJNISymbols = a.installPath(ctx)
|
||||
TransformJniLibsToJar(ctx, jniJarFile, jniLibs, a.useEmbeddedNativeLibs(ctx))
|
||||
for _, jni := range jniLibs {
|
||||
if jni.coverageFile.Valid() {
|
||||
|
@@ -111,8 +111,6 @@ func (a *AndroidAppImport) IsInstallable() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (a *AndroidAppImport) InstallBypassMake() bool { return true }
|
||||
|
||||
// Updates properties with variant-specific values.
|
||||
func (a *AndroidAppImport) processVariants(ctx android.LoadHookContext) {
|
||||
config := ctx.Config()
|
||||
|
@@ -204,7 +204,7 @@ func (c *ClasspathFragmentBase) androidMkEntries() []android.AndroidMkEntries {
|
||||
OutputFile: android.OptionalPathForPath(c.outputFilepath),
|
||||
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
|
||||
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
||||
entries.SetString("LOCAL_MODULE_PATH", c.installDirPath.ToMakePath().String())
|
||||
entries.SetString("LOCAL_MODULE_PATH", c.installDirPath.String())
|
||||
entries.SetString("LOCAL_INSTALLED_MODULE_STEM", c.outputFilepath.Base())
|
||||
},
|
||||
},
|
||||
|
@@ -381,7 +381,7 @@ func (d *dexpreopter) AndroidMkEntriesForApex() []android.AndroidMkEntries {
|
||||
OutputFile: android.OptionalPathForPath(install.outputPathOnHost),
|
||||
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
|
||||
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
||||
entries.SetString("LOCAL_MODULE_PATH", install.installDirOnDevice.ToMakePath().String())
|
||||
entries.SetString("LOCAL_MODULE_PATH", install.installDirOnDevice.String())
|
||||
entries.SetString("LOCAL_INSTALLED_MODULE_STEM", install.installFileOnDevice)
|
||||
entries.SetString("LOCAL_NOT_AVAILABLE_FOR_PLATFORM", "false")
|
||||
},
|
||||
|
@@ -59,7 +59,7 @@ func dexpreoptSystemserverCheckFactory() android.SingletonModule {
|
||||
|
||||
func getInstallPath(ctx android.ModuleContext, location string) android.InstallPath {
|
||||
return android.PathForModuleInPartitionInstall(
|
||||
ctx, "", strings.TrimPrefix(location, "/")).ToMakePath()
|
||||
ctx, "", strings.TrimPrefix(location, "/"))
|
||||
}
|
||||
|
||||
func (m *dexpreoptSystemserverCheck) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
|
@@ -267,8 +267,6 @@ func (j *Module) XrefJavaFiles() android.Paths {
|
||||
return j.kytheFiles
|
||||
}
|
||||
|
||||
func (j *Module) InstallBypassMake() bool { return true }
|
||||
|
||||
type dependencyTag struct {
|
||||
blueprint.BaseDependencyTag
|
||||
name string
|
||||
|
@@ -115,7 +115,7 @@ func (p *platformCompatConfig) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
Include: "$(BUILD_PREBUILT)",
|
||||
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
|
||||
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
||||
entries.SetString("LOCAL_MODULE_PATH", p.installDirPath.ToMakePath().String())
|
||||
entries.SetString("LOCAL_MODULE_PATH", p.installDirPath.String())
|
||||
entries.SetString("LOCAL_INSTALLED_MODULE_STEM", p.configFile.Base())
|
||||
},
|
||||
},
|
||||
|
@@ -352,7 +352,6 @@ func RobolectricTestFactory() android.Module {
|
||||
return module
|
||||
}
|
||||
|
||||
func (r *robolectricTest) InstallBypassMake() bool { return true }
|
||||
func (r *robolectricTest) InstallInTestcases() bool { return true }
|
||||
func (r *robolectricTest) InstallForceOS() (*android.OsType, *android.ArchType) {
|
||||
return &r.forceOSType, &r.forceArchType
|
||||
@@ -430,7 +429,6 @@ func (r *robolectricRuntimes) GenerateAndroidBuildActions(ctx android.ModuleCont
|
||||
}
|
||||
}
|
||||
|
||||
func (r *robolectricRuntimes) InstallBypassMake() bool { return true }
|
||||
func (r *robolectricRuntimes) InstallInTestcases() bool { return true }
|
||||
func (r *robolectricRuntimes) InstallForceOS() (*android.OsType, *android.ArchType) {
|
||||
return &r.forceOSType, &r.forceArchType
|
||||
|
@@ -63,6 +63,7 @@ func TestRuntimeResourceOverlay(t *testing.T) {
|
||||
result := android.GroupFixturePreparers(
|
||||
PrepareForTestWithJavaDefaultModules,
|
||||
PrepareForTestWithOverlayBuildComponents,
|
||||
android.FixtureModifyConfig(android.SetKatiEnabledForTests),
|
||||
fs.AddToFixture(),
|
||||
).RunTestWithBp(t, bp)
|
||||
|
||||
@@ -129,7 +130,10 @@ func TestRuntimeResourceOverlay(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) {
|
||||
ctx, config := testJava(t, `
|
||||
result := android.GroupFixturePreparers(
|
||||
PrepareForTestWithJavaDefaultModules,
|
||||
android.FixtureModifyConfig(android.SetKatiEnabledForTests),
|
||||
).RunTestWithBp(t, `
|
||||
java_defaults {
|
||||
name: "rro_defaults",
|
||||
theme: "default_theme",
|
||||
@@ -150,7 +154,7 @@ func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) {
|
||||
//
|
||||
// RRO module with defaults
|
||||
//
|
||||
m := ctx.ModuleForTests("foo_with_defaults", "android_common")
|
||||
m := result.ModuleForTests("foo_with_defaults", "android_common")
|
||||
|
||||
// Check AAPT2 link flags.
|
||||
aapt2Flags := strings.Split(m.Output("package-res.apk").Args["flags"], " ")
|
||||
@@ -161,14 +165,14 @@ func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) {
|
||||
}
|
||||
|
||||
// Check device location.
|
||||
path := android.AndroidMkEntriesForTest(t, ctx, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
|
||||
path := android.AndroidMkEntriesForTest(t, result.TestContext, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
|
||||
expectedPath := []string{shared.JoinPath("out/target/product/test_device/product/overlay/default_theme")}
|
||||
android.AssertStringPathsRelativeToTopEquals(t, "LOCAL_MODULE_PATH", config, expectedPath, path)
|
||||
android.AssertStringPathsRelativeToTopEquals(t, "LOCAL_MODULE_PATH", result.Config, expectedPath, path)
|
||||
|
||||
//
|
||||
// RRO module without defaults
|
||||
//
|
||||
m = ctx.ModuleForTests("foo_barebones", "android_common")
|
||||
m = result.ModuleForTests("foo_barebones", "android_common")
|
||||
|
||||
// Check AAPT2 link flags.
|
||||
aapt2Flags = strings.Split(m.Output("package-res.apk").Args["flags"], " ")
|
||||
@@ -178,9 +182,9 @@ func TestRuntimeResourceOverlay_JavaDefaults(t *testing.T) {
|
||||
}
|
||||
|
||||
// Check device location.
|
||||
path = android.AndroidMkEntriesForTest(t, ctx, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
|
||||
path = android.AndroidMkEntriesForTest(t, result.TestContext, m.Module())[0].EntryMap["LOCAL_MODULE_PATH"]
|
||||
expectedPath = []string{shared.JoinPath("out/target/product/test_device/product/overlay")}
|
||||
android.AssertStringPathsRelativeToTopEquals(t, "LOCAL_MODULE_PATH", config, expectedPath, path)
|
||||
android.AssertStringPathsRelativeToTopEquals(t, "LOCAL_MODULE_PATH", result.Config, expectedPath, path)
|
||||
}
|
||||
|
||||
func TestOverrideRuntimeResourceOverlay(t *testing.T) {
|
||||
|
@@ -2641,7 +2641,7 @@ func (module *sdkLibraryXml) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
|
||||
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
||||
entries.SetString("LOCAL_MODULE_TAGS", "optional")
|
||||
entries.SetString("LOCAL_MODULE_PATH", module.installDirPath.ToMakePath().String())
|
||||
entries.SetString("LOCAL_MODULE_PATH", module.installDirPath.String())
|
||||
entries.SetString("LOCAL_INSTALLED_MODULE_STEM", module.outputFilePath.Base())
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user