Merge "Export Soong install rules to Make" am: 1caea35278
am: 7f5f69f9ba
am: 5e5d6332b4
am: 71aa08677d
am: 90c6322388
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1869552 Change-Id: Ice7d471e98038ab1268933dfd8fbf19ee96b2c3d
This commit is contained in:
@@ -212,13 +212,7 @@ func (r *robolectricTest) GenerateAndroidBuildActions(ctx android.ModuleContext)
|
||||
installDeps = append(installDeps, installedData)
|
||||
}
|
||||
|
||||
installed := ctx.InstallFile(installPath, ctx.ModuleName()+".jar", r.combinedJar, installDeps...)
|
||||
|
||||
if r.ExportedToMake() {
|
||||
// Soong handles installation here, but Make is usually what creates the phony rule that atest
|
||||
// uses to build the module. Create it here for now.
|
||||
ctx.Phony(ctx.ModuleName(), installed)
|
||||
}
|
||||
r.installFile = ctx.InstallFile(installPath, ctx.ModuleName()+".jar", r.combinedJar, installDeps...)
|
||||
}
|
||||
|
||||
func generateRoboTestConfig(ctx android.ModuleContext, outputFile android.WritablePath,
|
||||
@@ -282,6 +276,10 @@ func (r *robolectricTest) generateRoboSrcJar(ctx android.ModuleContext, outputFi
|
||||
func (r *robolectricTest) AndroidMkEntries() []android.AndroidMkEntries {
|
||||
entriesList := r.Library.AndroidMkEntries()
|
||||
entries := &entriesList[0]
|
||||
entries.ExtraEntries = append(entries.ExtraEntries,
|
||||
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
|
||||
entries.SetBool("LOCAL_UNINSTALLABLE_MODULE", true)
|
||||
})
|
||||
|
||||
entries.ExtraFooters = []android.AndroidMkExtraFootersFunc{
|
||||
func(w io.Writer, name, prefix, moduleDir string) {
|
||||
|
Reference in New Issue
Block a user