Avoid circular dependency for the aconfig usage in libcore
Bug: 316554963 Test: m droid Change-Id: I6f45e585b8b656ef7ce1d51bbde0a44898198907
This commit is contained in:
@@ -62,10 +62,18 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) DepsMutator(module *ja
|
|||||||
ctx.AddDependency(ctx.Module(), declarationsTag, declarations)
|
ctx.AddDependency(ctx.Module(), declarationsTag, declarations)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// "libcore_aconfig_flags_lib" module has a circular dependency because the shared libraries
|
||||||
|
// are built on core_current and the module is used to flag the APIs in the core_current.
|
||||||
|
// http://b/316554963#comment2 has the details of the circular dependency chain.
|
||||||
|
// If a java_aconfig_library uses "none" sdk_version, it should include and build these
|
||||||
|
// annotation files as the shared library themselves.
|
||||||
|
var addLibraries bool = module.Library.Module.SdkVersion(ctx).Kind != android.SdkNone
|
||||||
|
if addLibraries {
|
||||||
// Add aconfig-annotations-lib as a dependency for the optimization / code stripping annotations
|
// Add aconfig-annotations-lib as a dependency for the optimization / code stripping annotations
|
||||||
module.AddSharedLibrary("aconfig-annotations-lib")
|
module.AddSharedLibrary("aconfig-annotations-lib")
|
||||||
// TODO(b/303773055): Remove the annotation after access issue is resolved.
|
// TODO(b/303773055): Remove the annotation after access issue is resolved.
|
||||||
module.AddSharedLibrary("unsupportedappusage")
|
module.AddSharedLibrary("unsupportedappusage")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuildActions(module *java.GeneratedJavaLibraryModule, ctx android.ModuleContext) android.Path {
|
func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuildActions(module *java.GeneratedJavaLibraryModule, ctx android.ModuleContext) android.Path {
|
||||||
|
Reference in New Issue
Block a user