Skip to content
Snippets Groups Projects
Commit 77d4c4ef authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Only use framework-connectivity stubs for -t stubs

Do not use framework-connectivity stubs for
framework-connectivity-t-pre-jarjar, as that library can build against
the full framework-connectivity implementation including hidden symbols:
it already builds against framework-connectivity-pre-jarjar.

The stubs are only necessary to build framework-connectivity-t stubs, to
avoid circular dependencies between these and the framework-connectivity
implementation.

This change allows using hidden symbols of framework-connectivity in
framework-connectivity-t-pre-jarjar, but does not fully fix the problem
as framework-connectivity-t will use the framework-connectivity stubs
both to build its own stubs and to build its implementation library, due
to "libs" being used in both cases (and prioritized over
impl_only_libs). As a result, it is still not possible to build
framework-connectivity-t when it references hidden symbols of classes
that are also part of the stubs. Still, this is a first step and
organizes the build rules closer to what they should be.

Bug: 139774492
Test: m
Change-Id: I5e696fa6a7871d048e0ba16442de33b5f139faae
parent c37d806d
No related branches found
No related tags found
No related merge requests found
......@@ -43,14 +43,9 @@ java_defaults {
":framework-connectivity-tiramisu-updatable-sources",
":framework-nearby-java-sources",
],
stub_only_libs: [
// Use prebuilt framework-connectivity stubs to avoid circular dependencies
"sdk_module-lib_current_framework-connectivity",
],
libs: [
"unsupportedappusage",
"app-compat-annotations",
"sdk_module-lib_current_framework-connectivity",
],
impl_only_libs: [
// The build system will use framework-bluetooth module_current stubs, because
......@@ -104,6 +99,13 @@ java_sdk_library {
// The jarjar rules are only so that references to jarjared utils in
// framework-connectivity-pre-jarjar match at runtime.
jarjar_rules: ":framework-connectivity-jarjar-rules",
stub_only_libs: [
// Use prebuilt framework-connectivity stubs to avoid circular dependencies
"sdk_module-lib_current_framework-connectivity",
],
libs: [
"sdk_module-lib_current_framework-connectivity",
],
permitted_packages: [
"android.app.usage",
"android.net",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment