Loading sdk/bootclasspath_fragment_sdk_test.go +1 −0 Original line number Diff line number Diff line Loading @@ -839,6 +839,7 @@ func TestSnapshotWithBootclasspathFragment_HiddenAPI(t *testing.T) { compile_dex: true, public: {enabled: true}, permitted_packages: ["mysdklibrary"], min_sdk_version: "current", } java_sdk_library { Loading sdk/update.go +11 −0 Original line number Diff line number Diff line Loading @@ -357,6 +357,12 @@ func (s *sdk) buildSnapshot(ctx android.ModuleContext, sdkVariants []*sdk) { // If the minApiLevel of the member is greater than the target API level then exclude it from // this snapshot. exclude := memberVariantDep.minApiLevel.GreaterThan(targetApiLevel) // Always include host variants (e.g. host tools) in the snapshot. // Host variants should not be guarded by a min_sdk_version check. In fact, host variants // do not have a `min_sdk_version`. if memberVariantDep.Host() { exclude = false } addMember(name, export, exclude) Loading Loading @@ -1263,6 +1269,11 @@ type sdkMemberVariantDep struct { minApiLevel android.ApiLevel } // Host returns true if the sdk member is a host variant (e.g. host tool) func (s *sdkMemberVariantDep) Host() bool { return s.variant.Target().Os.Class == android.Host } var _ android.SdkMember = (*sdkMember)(nil) // sdkMember groups all the variants of a specific member module together along with the name of the Loading Loading
sdk/bootclasspath_fragment_sdk_test.go +1 −0 Original line number Diff line number Diff line Loading @@ -839,6 +839,7 @@ func TestSnapshotWithBootclasspathFragment_HiddenAPI(t *testing.T) { compile_dex: true, public: {enabled: true}, permitted_packages: ["mysdklibrary"], min_sdk_version: "current", } java_sdk_library { Loading
sdk/update.go +11 −0 Original line number Diff line number Diff line Loading @@ -357,6 +357,12 @@ func (s *sdk) buildSnapshot(ctx android.ModuleContext, sdkVariants []*sdk) { // If the minApiLevel of the member is greater than the target API level then exclude it from // this snapshot. exclude := memberVariantDep.minApiLevel.GreaterThan(targetApiLevel) // Always include host variants (e.g. host tools) in the snapshot. // Host variants should not be guarded by a min_sdk_version check. In fact, host variants // do not have a `min_sdk_version`. if memberVariantDep.Host() { exclude = false } addMember(name, export, exclude) Loading Loading @@ -1263,6 +1269,11 @@ type sdkMemberVariantDep struct { minApiLevel android.ApiLevel } // Host returns true if the sdk member is a host variant (e.g. host tool) func (s *sdkMemberVariantDep) Host() bool { return s.variant.Target().Os.Class == android.Host } var _ android.SdkMember = (*sdkMember)(nil) // sdkMember groups all the variants of a specific member module together along with the name of the Loading