Merge "Remove javalib special case in createDeapexerModuleIfNeeded" am: 6b592bdcdc
am: 5349528f57
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1740315 Change-Id: Idef64da43b738b9f51c2e2ec1b563281eab4a60f
This commit is contained in:
@@ -81,6 +81,9 @@ func (b bootclasspathFragmentContentDependencyTag) ExportMember() bool {
|
||||
// they were listed in java_libs.
|
||||
func (b bootclasspathFragmentContentDependencyTag) CopyDirectlyInAnyApex() {}
|
||||
|
||||
// Contents of bootclasspath fragments require files from prebuilt apex files.
|
||||
func (b bootclasspathFragmentContentDependencyTag) RequiresFilesFromPrebuiltApex() {}
|
||||
|
||||
// The tag used for the dependency between the bootclasspath_fragment module and its contents.
|
||||
var bootclasspathFragmentContentDepTag = bootclasspathFragmentContentDependencyTag{}
|
||||
|
||||
@@ -88,6 +91,7 @@ var _ android.ExcludeFromVisibilityEnforcementTag = bootclasspathFragmentContent
|
||||
var _ android.ReplaceSourceWithPrebuilt = bootclasspathFragmentContentDepTag
|
||||
var _ android.SdkMemberTypeDependencyTag = bootclasspathFragmentContentDepTag
|
||||
var _ android.CopyDirectlyInAnyApexTag = bootclasspathFragmentContentDepTag
|
||||
var _ android.RequiresFilesFromPrebuiltApexTag = bootclasspathFragmentContentDepTag
|
||||
|
||||
func IsBootclasspathFragmentContentDepTag(tag blueprint.DependencyTag) bool {
|
||||
return tag == bootclasspathFragmentContentDepTag
|
||||
|
18
java/java.go
18
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)
|
||||
|
@@ -2269,6 +2269,13 @@ func (module *SdkLibraryImport) ImplementationAndResourcesJars() android.Paths {
|
||||
}
|
||||
}
|
||||
|
||||
var _ android.RequiredFilesFromPrebuiltApex = (*SdkLibraryImport)(nil)
|
||||
|
||||
func (module *SdkLibraryImport) RequiredFilesFromPrebuiltApex(ctx android.BaseModuleContext) map[string]string {
|
||||
name := module.BaseModuleName()
|
||||
return requiredFilesFromPrebuiltApexForImport(name)
|
||||
}
|
||||
|
||||
//
|
||||
// java_sdk_library_xml
|
||||
//
|
||||
|
Reference in New Issue
Block a user