Allow exporting of sdk members to be done per tag

Previously, every module added to an sdk directly through one of the
SdkMemberType specific properties, e.g. java_libs, was exported and
every module added automatically via a transitive dependencies was not
exported. This change allows that behavior to be customized per tag.

Bug: 186290299
Test: m art-module-sdk
      - verify that this change does not affect its contents.
Change-Id: I563b5bcd823e61c23cdb706cfcbb13337963d550
This commit is contained in:
Paul Duffin
2021-04-23 21:20:20 +01:00
parent 2d1bb89fe3
commit a720811c38
4 changed files with 44 additions and 27 deletions

View File

@@ -77,8 +77,9 @@ var (
"classpath", "outDir", "workDir")
// Dependency tag that causes the added dependencies to be added as java_header_libs
// to the sdk/module_exports/snapshot.
systemModulesLibsTag = android.DependencyTagForSdkMemberType(javaHeaderLibsSdkMemberType)
// to the sdk/module_exports/snapshot. Dependencies that are added automatically via this tag are
// not automatically exported.
systemModulesLibsTag = android.DependencyTagForSdkMemberType(javaHeaderLibsSdkMemberType, false)
)
func TransformJarsToSystemModules(ctx android.ModuleContext, jars android.Paths) (android.Path, android.Paths) {