Loading apex/apex.go +7 −4 Original line number Diff line number Diff line Loading @@ -1338,10 +1338,13 @@ func (p *Prebuilt) installable() bool { } func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) { // If the device is configured to use flattened APEX, don't set // p.properties.Source so that the prebuilt module (which is // a non-flattened APEX) is not used. forceDisable := ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild() // If the device is configured to use flattened APEX, force disable the prebuilt because // the prebuilt is a non-flattened one. forceDisable := ctx.Config().FlattenApex() // Force disable the prebuilts when we are doing unbundled build. We do unbundled build // to build the prebuilts themselves. forceDisable = forceDisable || !ctx.Config().UnbundledBuild() // b/137216042 don't use prebuilts when address sanitizer is on forceDisable = forceDisable || android.InList("address", ctx.Config().SanitizeDevice()) || Loading java/hiddenapi_singleton.go +2 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ func (h *hiddenAPISingleton) GenerateBuildActions(ctx android.SingletonContext) stubFlagsRule(ctx) // These rules depend on files located in frameworks/base, skip them if running in a tree that doesn't have them. if ctx.Config().FrameworksBaseDirExists(ctx) && !ctx.Config().UnbundledBuild() { if ctx.Config().FrameworksBaseDirExists(ctx) { h.flags = flagsRule(ctx) h.metadata = metadataRule(ctx) } else { Loading Loading @@ -94,7 +94,7 @@ func stubFlagsRule(ctx android.SingletonContext) { // Add the android.test.base to the set of stubs only if the android.test.base module is on // the boot jars list as the runtime will only enforce hiddenapi access against modules on // that list. if inList("android.test.base", ctx.Config().BootJars()) { if inList("android.test.base", ctx.Config().BootJars()) && !ctx.Config().UnbundledBuildUsePrebuiltSdks() { publicStubModules = append(publicStubModules, "android.test.base.stubs") } Loading java/java.go +3 −5 Original line number Diff line number Diff line Loading @@ -1270,11 +1270,9 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path return } if !ctx.Config().UnbundledBuild() { // Hidden API CSV generation and dex encoding dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile, j.deviceProperties.UncompressDex) } // merge dex jar with resources if necessary if j.resourceJar != nil { Loading java/sdk_library.go +8 −3 Original line number Diff line number Diff line Loading @@ -162,15 +162,20 @@ var _ Dependency = (*SdkLibrary)(nil) var _ SdkLibraryDependency = (*SdkLibrary)(nil) func (module *SdkLibrary) DepsMutator(ctx android.BottomUpMutatorContext) { useBuiltStubs := !ctx.Config().UnbundledBuildUsePrebuiltSdks() // Add dependencies to the stubs library if useBuiltStubs { ctx.AddVariationDependencies(nil, publicApiStubsTag, module.stubsName(apiScopePublic)) } ctx.AddVariationDependencies(nil, publicApiFileTag, module.docsName(apiScopePublic)) if !Bool(module.properties.No_standard_libs) { if useBuiltStubs { ctx.AddVariationDependencies(nil, systemApiStubsTag, module.stubsName(apiScopeSystem)) ctx.AddVariationDependencies(nil, testApiStubsTag, module.stubsName(apiScopeTest)) } ctx.AddVariationDependencies(nil, systemApiFileTag, module.docsName(apiScopeSystem)) ctx.AddVariationDependencies(nil, testApiFileTag, module.docsName(apiScopeTest)) ctx.AddVariationDependencies(nil, testApiStubsTag, module.stubsName(apiScopeTest)) } module.Library.deps(ctx) Loading Loading
apex/apex.go +7 −4 Original line number Diff line number Diff line Loading @@ -1338,10 +1338,13 @@ func (p *Prebuilt) installable() bool { } func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) { // If the device is configured to use flattened APEX, don't set // p.properties.Source so that the prebuilt module (which is // a non-flattened APEX) is not used. forceDisable := ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild() // If the device is configured to use flattened APEX, force disable the prebuilt because // the prebuilt is a non-flattened one. forceDisable := ctx.Config().FlattenApex() // Force disable the prebuilts when we are doing unbundled build. We do unbundled build // to build the prebuilts themselves. forceDisable = forceDisable || !ctx.Config().UnbundledBuild() // b/137216042 don't use prebuilts when address sanitizer is on forceDisable = forceDisable || android.InList("address", ctx.Config().SanitizeDevice()) || Loading
java/hiddenapi_singleton.go +2 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ func (h *hiddenAPISingleton) GenerateBuildActions(ctx android.SingletonContext) stubFlagsRule(ctx) // These rules depend on files located in frameworks/base, skip them if running in a tree that doesn't have them. if ctx.Config().FrameworksBaseDirExists(ctx) && !ctx.Config().UnbundledBuild() { if ctx.Config().FrameworksBaseDirExists(ctx) { h.flags = flagsRule(ctx) h.metadata = metadataRule(ctx) } else { Loading Loading @@ -94,7 +94,7 @@ func stubFlagsRule(ctx android.SingletonContext) { // Add the android.test.base to the set of stubs only if the android.test.base module is on // the boot jars list as the runtime will only enforce hiddenapi access against modules on // that list. if inList("android.test.base", ctx.Config().BootJars()) { if inList("android.test.base", ctx.Config().BootJars()) && !ctx.Config().UnbundledBuildUsePrebuiltSdks() { publicStubModules = append(publicStubModules, "android.test.base.stubs") } Loading
java/java.go +3 −5 Original line number Diff line number Diff line Loading @@ -1270,11 +1270,9 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path return } if !ctx.Config().UnbundledBuild() { // Hidden API CSV generation and dex encoding dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile, j.deviceProperties.UncompressDex) } // merge dex jar with resources if necessary if j.resourceJar != nil { Loading
java/sdk_library.go +8 −3 Original line number Diff line number Diff line Loading @@ -162,15 +162,20 @@ var _ Dependency = (*SdkLibrary)(nil) var _ SdkLibraryDependency = (*SdkLibrary)(nil) func (module *SdkLibrary) DepsMutator(ctx android.BottomUpMutatorContext) { useBuiltStubs := !ctx.Config().UnbundledBuildUsePrebuiltSdks() // Add dependencies to the stubs library if useBuiltStubs { ctx.AddVariationDependencies(nil, publicApiStubsTag, module.stubsName(apiScopePublic)) } ctx.AddVariationDependencies(nil, publicApiFileTag, module.docsName(apiScopePublic)) if !Bool(module.properties.No_standard_libs) { if useBuiltStubs { ctx.AddVariationDependencies(nil, systemApiStubsTag, module.stubsName(apiScopeSystem)) ctx.AddVariationDependencies(nil, testApiStubsTag, module.stubsName(apiScopeTest)) } ctx.AddVariationDependencies(nil, systemApiFileTag, module.docsName(apiScopeSystem)) ctx.AddVariationDependencies(nil, testApiFileTag, module.docsName(apiScopeTest)) ctx.AddVariationDependencies(nil, testApiStubsTag, module.stubsName(apiScopeTest)) } module.Library.deps(ctx) Loading