summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2021-06-17 14:56:05 +0100
committer Paul Duffin <paulduffin@google.com> 2021-06-17 14:56:05 +0100
commitfef5500a766d1f515ff19038e8e0e8f606e07287 (patch)
tree7b26aea6ab65d764773299871c257aa50934531f /java/java.go
parentf45966f35b10be5e53111d9f5f29fdb4cdf140fd (diff)
Remove javalib special case in createDeapexerModuleIfNeeded
Removes the special case in createDeapexerModuleIfNeeded for handling java libraries and just get the Import and SdkLibraryImport module types to implement RequiredFilesFromPrebuiltApex instead. Bug: 177892522 Test: m nothing Change-Id: I5cc341b5b4168b8eb196f72273a00d498de6856f
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/java/java.go b/java/java.go
index 2bbb5b102..3b6c9c884 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1426,6 +1426,24 @@ func (j *Import) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
return nil
}
+// requiredFilesFromPrebuiltApexForImport returns information about the files that a java_import or
+// java_sdk_library_import with the specified base module name requires to be exported from a
+// prebuilt_apex/apex_set.
+func requiredFilesFromPrebuiltApexForImport(name string) map[string]string {
+ // Add the dex implementation jar to the set of exported files. The path here must match the
+ // path of the file in the APEX created by apexFileForJavaModule(...).
+ return map[string]string{
+ name + "{.dexjar}": filepath.Join("javalib", name+".jar"),
+ }
+}
+
+var _ android.RequiredFilesFromPrebuiltApex = (*Import)(nil)
+
+func (j *Import) RequiredFilesFromPrebuiltApex(ctx android.BaseModuleContext) map[string]string {
+ name := j.BaseModuleName()
+ return requiredFilesFromPrebuiltApexForImport(name)
+}
+
// Add compile time check for interface implementation
var _ android.IDEInfo = (*Import)(nil)
var _ android.IDECustomizedModuleName = (*Import)(nil)