Deprecate 'contributions' field from linkerconfig

Linkerconfig's contribution feature was introduced in Android T, but
it's not used actively (probably, never used?). Let's deprecate it. Note
that its runtime behavior is kept to support any potential uses.

Bug: 309716069
Test: linkerconfig_diff_test
Test: Add "contributions" field to an apex, build it.
      It should fail with an error message.
Change-Id: Icb91919142de14696219308674f1b3ac3e2d029b
This commit is contained in:
Jooyung Han 2023-11-08 13:38:36 +09:00
parent 2ab031f467
commit eb421ee86e

View file

@ -149,6 +149,11 @@ def Validate(args):
else:
sys.exit(f'Unknown type: {args.type}')
# Reject contributions field at build time while keeping the runtime behavior for GRF.
if getattr(pb, 'contributions'):
sys.exit(f"{args.input}: 'contributions' is set. "
"It's deprecated. Instead, make the APEX 'visible' and use android_dlopen_ext().")
def ValidateAndWriteAsPbFile(pb, output_path):
ValidateConfiguration(pb)