diff options
author | 2022-08-19 15:08:13 +0000 | |
---|---|---|
committer | 2022-08-19 15:08:13 +0000 | |
commit | 1149c2c185a53ef0d0f13dd8bdb52095a8ef4049 (patch) | |
tree | 2c6927a4f9034dee569414e4544439c59db9d085 /java/bootclasspath_fragment.go | |
parent | e29d230b752d11abca3bb558a04c6d57eef9104e (diff) | |
parent | 9b61abbd840503dd9bd2eebf7fee8be627be4eb5 (diff) |
Merge changes I66445302,I773279a4
* changes:
Push Hidden_api inside HiddenAPIFlagFileProperties
Refactor handling of hidden API property provided information
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r-- | java/bootclasspath_fragment.go | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index 56401b3f7..7580352d0 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -128,7 +128,7 @@ type bootclasspathFragmentProperties struct { Coverage BootclasspathFragmentCoverageAffectedProperties // Hidden API related properties. - Hidden_api HiddenAPIFlagFileProperties + HiddenAPIFlagFileProperties // The list of additional stub libraries which this fragment's contents use but which are not // provided by another bootclasspath_fragment. @@ -145,7 +145,7 @@ type bootclasspathFragmentProperties struct { BootclasspathFragmentsDepsProperties } -type HiddenApiPackageProperties struct { +type HiddenAPIPackageProperties struct { Hidden_api struct { // Contains prefixes of a package hierarchy that is provided solely by this // bootclasspath_fragment. @@ -222,8 +222,8 @@ type HiddenApiPackageProperties struct { } type SourceOnlyBootclasspathProperties struct { - HiddenApiPackageProperties - Coverage HiddenApiPackageProperties + HiddenAPIPackageProperties + Coverage HiddenAPIPackageProperties } type BootclasspathFragmentModule struct { @@ -293,7 +293,7 @@ func bootclasspathFragmentFactory() android.Module { return } - err = proptools.AppendProperties(&m.sourceOnlyProperties.HiddenApiPackageProperties, &m.sourceOnlyProperties.Coverage, nil) + err = proptools.AppendProperties(&m.sourceOnlyProperties.HiddenAPIPackageProperties, &m.sourceOnlyProperties.Coverage, nil) if err != nil { ctx.PropertyErrorf("coverage", "error trying to append hidden api coverage specific properties: %s", err) return @@ -825,7 +825,10 @@ func (b *BootclasspathFragmentModule) createHiddenAPIFlagInput(ctx android.Modul input.gatherStubLibInfo(ctx, contents) // Populate with flag file paths from the properties. - input.extractFlagFilesFromProperties(ctx, &b.properties.Hidden_api) + input.extractFlagFilesFromProperties(ctx, &b.properties.HiddenAPIFlagFileProperties) + + // Populate with package rules from the properties. + input.extractPackageRulesFromProperties(&b.sourceOnlyProperties.HiddenAPIPackageProperties) // Add the stub dex jars from this module's fragment dependencies. input.DependencyStubDexJarsByScope.addStubDexJarsByModule(dependencyHiddenApiInfo.TransitiveStubDexJarsByScope) @@ -862,9 +865,9 @@ func (b *BootclasspathFragmentModule) produceHiddenAPIOutput(ctx android.ModuleC // If the module specifies split_packages or package_prefixes then use those to generate the // signature patterns. - splitPackages := b.sourceOnlyProperties.Hidden_api.Split_packages - packagePrefixes := b.sourceOnlyProperties.Hidden_api.Package_prefixes - singlePackages := b.sourceOnlyProperties.Hidden_api.Single_packages + splitPackages := input.SplitPackages + packagePrefixes := input.PackagePrefixes + singlePackages := input.SinglePackages if splitPackages != nil || packagePrefixes != nil || singlePackages != nil { output.SignaturePatternsPath = buildRuleSignaturePatternsFile( ctx, output.AllFlagsPath, splitPackages, packagePrefixes, singlePackages) |