Implement InstallableModule for Java modules

This change enables the container information to be collected for Java
modules.

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I01bf99fa274275a608601ad6248d577ae8f6dffc
This commit is contained in:
Jihoon Kang
2024-06-26 22:18:10 +00:00
parent c3d4e115af
commit f86fe9a876
5 changed files with 472 additions and 0 deletions

View File

@@ -552,6 +552,18 @@ type Module struct {
aconfigCacheFiles android.Paths
}
var _ android.InstallableModule = (*Module)(nil)
// To satisfy the InstallableModule interface
func (j *Module) EnforceApiContainerChecks() bool {
return true
}
// Overrides android.ModuleBase.InstallInProduct()
func (j *Module) InstallInProduct() bool {
return j.ProductSpecific()
}
func (j *Module) CheckStableSdkVersion(ctx android.BaseModuleContext) error {
sdkVersion := j.SdkVersion(ctx)
if sdkVersion.Stable() {