Export resource processor R.jar files to ASfP

Export the R.jar files generated by ResourceProcessorBusyBox to
module_bp_java_deps.json for use by Android Studio for Platform.

Bug: 305997998
Test: examine module_bp_java_deps.json
Change-Id: I48e3e28b45219646765de7848ec9dbe77d14c662
This commit is contained in:
Colin Cross 2023-10-17 13:21:02 -07:00
parent bc98b4151d
commit 95b53b83eb
2 changed files with 16 additions and 0 deletions

View file

@ -819,6 +819,17 @@ func (a *AndroidLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext)
}
}
func (a *AndroidLibrary) IDEInfo(dpInfo *android.IdeInfo) {
a.Library.IDEInfo(dpInfo)
a.aapt.IDEInfo(dpInfo)
}
func (a *aapt) IDEInfo(dpInfo *android.IdeInfo) {
if a.useResourceProcessorBusyBox() {
dpInfo.Jars = append(dpInfo.Jars, a.rJar.String())
}
}
// android_library builds and links sources into a `.jar` file for the device along with Android resources.
//
// An android_library has a single variant that produces a `.jar` file containing `.class` files that were

View file

@ -1073,6 +1073,11 @@ func (a *AndroidApp) EnableCoverageIfNeeded() {}
var _ cc.Coverage = (*AndroidApp)(nil)
func (a *AndroidApp) IDEInfo(dpInfo *android.IdeInfo) {
a.Library.IDEInfo(dpInfo)
a.aapt.IDEInfo(dpInfo)
}
// android_app compiles sources and Android resources into an Android application package `.apk` file.
func AndroidAppFactory() android.Module {
module := &AndroidApp{}