summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-12-17 04:14:35 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-12-17 04:14:35 +0000
commit1a74be780b27b6540799dba4a038f6cf1431d0fe (patch)
tree3204eeed9823b961fbf7566cde1056ce96bc117e /java/java.go
parente808dae1fdd23c9d36dd094aca6bd55b033b5908 (diff)
parent45bf82e95361bffb1cf0f17ebf45aef05a8e03b8 (diff)
Merge "Assert android.ApexModule interface for types having ApexModuleBase"
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index d44719e99..02d78f2bf 100644
--- a/java/java.go
+++ b/java/java.go
@@ -2021,10 +2021,12 @@ func (j *Module) hasCode(ctx android.ModuleContext) bool {
return len(srcFiles) > 0 || len(ctx.GetDirectDepsWithTag(staticLibTag)) > 0
}
+// Implements android.ApexModule
func (j *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
return j.depIsInSameApex(ctx, dep)
}
+// Implements android.ApexModule
func (j *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
sdkVersion android.ApiLevel) error {
sdkSpec := j.minSdkVersion()
@@ -2070,6 +2072,8 @@ type Library struct {
InstallMixin func(ctx android.ModuleContext, installPath android.Path) (extraInstallDeps android.Paths)
}
+var _ android.ApexModule = (*Library)(nil)
+
// Provides access to the list of permitted packages from updatable boot jars.
type PermittedPackagesForUpdatableBootJars interface {
PermittedPackagesForUpdatableBootJars() []string
@@ -2934,10 +2938,14 @@ func (j *Import) SrcJarArgs() ([]string, android.Paths) {
return nil, nil
}
+var _ android.ApexModule = (*Import)(nil)
+
+// Implements android.ApexModule
func (j *Import) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool {
return j.depIsInSameApex(ctx, dep)
}
+// Implements android.ApexModule
func (j *Import) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
sdkVersion android.ApiLevel) error {
// Do not check for prebuilts against the min_sdk_version of enclosing APEX
@@ -3129,6 +3137,9 @@ func (j *DexImport) DexJarBuildPath() android.Path {
return j.dexJarFile
}
+var _ android.ApexModule = (*DexImport)(nil)
+
+// Implements android.ApexModule
func (j *DexImport) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
sdkVersion android.ApiLevel) error {
// we don't check prebuilt modules for sdk_version