Remove bootclasspathApiInfo am: 18cf19745e
am: 3c22863451
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1716115 Change-Id: I4c07be9ce52ec3455ea92778070e8565ec0969f5
This commit is contained in:
@@ -235,12 +235,3 @@ func (p BootclasspathAPIProperties) sdkKindToStubLibs() map[android.SdkKind][]st
|
|||||||
m[android.SdkCorePlatform] = p.Core_platform_api.Stub_libs
|
m[android.SdkCorePlatform] = p.Core_platform_api.Stub_libs
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
||||||
// bootclasspathApiInfo contains paths resolved from BootclasspathAPIProperties
|
|
||||||
type bootclasspathApiInfo struct {
|
|
||||||
// stubJarsByKind maps from the android.SdkKind to the paths containing dex stub jars for each
|
|
||||||
// kind.
|
|
||||||
stubJarsByKind map[android.SdkKind]android.Paths
|
|
||||||
}
|
|
||||||
|
|
||||||
var bootclasspathApiInfoProvider = blueprint.NewProvider(bootclasspathApiInfo{})
|
|
||||||
|
@@ -507,10 +507,6 @@ func (b *BootclasspathFragmentModule) generateHiddenAPIBuildActions(ctx android.
|
|||||||
// Create hidden API input structure.
|
// Create hidden API input structure.
|
||||||
input := b.createHiddenAPIFlagInput(ctx, contents)
|
input := b.createHiddenAPIFlagInput(ctx, contents)
|
||||||
|
|
||||||
// Store the information for use by other modules.
|
|
||||||
bootclasspathApiInfo := bootclasspathApiInfo{stubJarsByKind: input.StubDexJarsByKind}
|
|
||||||
ctx.SetProvider(bootclasspathApiInfoProvider, bootclasspathApiInfo)
|
|
||||||
|
|
||||||
var output *HiddenAPIFlagOutput
|
var output *HiddenAPIFlagOutput
|
||||||
|
|
||||||
// Hidden API processing is conditional as a temporary workaround as not all
|
// Hidden API processing is conditional as a temporary workaround as not all
|
||||||
@@ -534,6 +530,9 @@ func (b *BootclasspathFragmentModule) generateHiddenAPIBuildActions(ctx android.
|
|||||||
// generation. That is because the monolithic hidden API processing uses those flag files to
|
// generation. That is because the monolithic hidden API processing uses those flag files to
|
||||||
// perform its own flag generation.
|
// perform its own flag generation.
|
||||||
FlagFilesByCategory: input.FlagFilesByCategory,
|
FlagFilesByCategory: input.FlagFilesByCategory,
|
||||||
|
|
||||||
|
// Make these available for tests.
|
||||||
|
StubDexJarsByKind: input.StubDexJarsByKind,
|
||||||
}
|
}
|
||||||
|
|
||||||
if output != nil {
|
if output != nil {
|
||||||
|
@@ -252,7 +252,7 @@ func TestBootclasspathFragment_StubLibs(t *testing.T) {
|
|||||||
`)
|
`)
|
||||||
|
|
||||||
fragment := result.Module("myfragment", "android_common")
|
fragment := result.Module("myfragment", "android_common")
|
||||||
info := result.ModuleProvider(fragment, bootclasspathApiInfoProvider).(bootclasspathApiInfo)
|
info := result.ModuleProvider(fragment, HiddenAPIInfoProvider).(HiddenAPIInfo)
|
||||||
|
|
||||||
stubsJar := "out/soong/.intermediates/mystublib/android_common/dex/mystublib.jar"
|
stubsJar := "out/soong/.intermediates/mystublib/android_common/dex/mystublib.jar"
|
||||||
|
|
||||||
@@ -264,17 +264,17 @@ func TestBootclasspathFragment_StubLibs(t *testing.T) {
|
|||||||
otherPublicStubsJar := "out/soong/.intermediates/myothersdklibrary.stubs/android_common/dex/myothersdklibrary.stubs.jar"
|
otherPublicStubsJar := "out/soong/.intermediates/myothersdklibrary.stubs/android_common/dex/myothersdklibrary.stubs.jar"
|
||||||
|
|
||||||
// Check that SdkPublic uses public stubs for all sdk libraries.
|
// Check that SdkPublic uses public stubs for all sdk libraries.
|
||||||
android.AssertPathsRelativeToTopEquals(t, "public dex stubs jar", []string{otherPublicStubsJar, publicStubsJar, stubsJar}, info.stubJarsByKind[android.SdkPublic])
|
android.AssertPathsRelativeToTopEquals(t, "public dex stubs jar", []string{otherPublicStubsJar, publicStubsJar, stubsJar}, info.StubDexJarsByKind[android.SdkPublic])
|
||||||
|
|
||||||
// Check that SdkSystem uses system stubs for mysdklibrary and public stubs for myothersdklibrary
|
// Check that SdkSystem uses system stubs for mysdklibrary and public stubs for myothersdklibrary
|
||||||
// as it does not provide system stubs.
|
// as it does not provide system stubs.
|
||||||
android.AssertPathsRelativeToTopEquals(t, "system dex stubs jar", []string{otherPublicStubsJar, systemStubsJar, stubsJar}, info.stubJarsByKind[android.SdkSystem])
|
android.AssertPathsRelativeToTopEquals(t, "system dex stubs jar", []string{otherPublicStubsJar, systemStubsJar, stubsJar}, info.StubDexJarsByKind[android.SdkSystem])
|
||||||
|
|
||||||
// Check that SdkTest also uses system stubs for mysdklibrary as it does not provide test stubs
|
// Check that SdkTest also uses system stubs for mysdklibrary as it does not provide test stubs
|
||||||
// and public stubs for myothersdklibrary as it does not provide test stubs either.
|
// and public stubs for myothersdklibrary as it does not provide test stubs either.
|
||||||
android.AssertPathsRelativeToTopEquals(t, "test dex stubs jar", []string{otherPublicStubsJar, systemStubsJar, stubsJar}, info.stubJarsByKind[android.SdkTest])
|
android.AssertPathsRelativeToTopEquals(t, "test dex stubs jar", []string{otherPublicStubsJar, systemStubsJar, stubsJar}, info.StubDexJarsByKind[android.SdkTest])
|
||||||
|
|
||||||
// Check that SdkCorePlatform uses public stubs from the mycoreplatform library.
|
// Check that SdkCorePlatform uses public stubs from the mycoreplatform library.
|
||||||
corePlatformStubsJar := "out/soong/.intermediates/mycoreplatform.stubs/android_common/dex/mycoreplatform.stubs.jar"
|
corePlatformStubsJar := "out/soong/.intermediates/mycoreplatform.stubs/android_common/dex/mycoreplatform.stubs.jar"
|
||||||
android.AssertPathsRelativeToTopEquals(t, "core platform dex stubs jar", []string{corePlatformStubsJar}, info.stubJarsByKind[android.SdkCorePlatform])
|
android.AssertPathsRelativeToTopEquals(t, "core platform dex stubs jar", []string{corePlatformStubsJar}, info.StubDexJarsByKind[android.SdkCorePlatform])
|
||||||
}
|
}
|
||||||
|
@@ -348,6 +348,9 @@ type HiddenAPIInfo struct {
|
|||||||
// that category.
|
// that category.
|
||||||
FlagFilesByCategory FlagFilesByCategory
|
FlagFilesByCategory FlagFilesByCategory
|
||||||
|
|
||||||
|
// The paths to the stub dex jars for each of the android.SdkKind in hiddenAPIRelevantSdkKinds.
|
||||||
|
StubDexJarsByKind StubDexJarsByKind
|
||||||
|
|
||||||
// The output from the hidden API processing needs to be made available to other modules.
|
// The output from the hidden API processing needs to be made available to other modules.
|
||||||
HiddenAPIFlagOutput
|
HiddenAPIFlagOutput
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user