Previously, the platform_compat_config modules needed to be explicitly
listed in the sdk snapshot and the apex. This change will automatically
export them to the sdk snapshot when the apex is listed in its apexes
property.
Bug: 232401814
Test: m tethering-module-sdk
# Before this change the generated snapshot did not contain the
# platform_compat_config, after this change it did.
m art-module-sdk
# As that explicitly specifies the platform_compat_config in its
# compat_configs property this change has no effect.
Change-Id: Ia854b9a52db2b1619fca41a387ce98d7f9f9efe9
Replaces the BottomUpMutatorContext parameter with a new
SdkDependencyContext type that extends BottomUpMutatorContext. This is
to allow the sdk to pass additional information to the implementations
of that method to allow the behavior to be more finely tuned.
Bug: 195754365
Test: m nothing
Change-Id: I69c6d2c523934eb67d7a7e6c55c241e9b8a81773
Previously, unpacking a snapshot containing a
prebuilt_platform_compat_config into a source build would cause build
failure because of duplicate ids because the singleton would collate
ids from both prebuilts (versioned and unversioned) and source.
This change filters out versioned prebuilts and only uses prebuilts
that are preferred and source modules that have not been replaced by a
prebuilt.
Bug: 182402754
Test: m nothing
Change-Id: Idacbb34444e5156370df70bf88c6e8a7e2d67890
It just provides the metadata needed by the global singleton as the
rest is in the apex.
Bug: 182402754
Test: m nothing
Change-Id: I511df7a3a06dab13ddb9ad63392ae5310dfee9c4
The platform_compat_config_singleton only needs access to the metadata
so this separates that method into its own interface, distinct from the
one needed by the apex. This also adds a test to ensure that the merging
still works.
Bug: 182402754
Test: m nothing
Change-Id: I5212239786810e5fc5eb99831b1122db93d1329f
The types and methods are separated and interleaved with each other
so this moves them so that they are together.
Bug: 182402754
Test: m nothing
Change-Id: I275f6af30491d2440499b9ee3f201eea227d23f8
Add a ctx parameter to AndroidMkExtraEntriesFunc to allow them to
access providers.
Test: m checkbuild
Change-Id: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
Merged-In: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
Enable the RuleBuilder and RuleBuilderCommand methods to access
the BuilderContext by passing it to NewRuleBuilder instead of
RuleBuilder.Build.
Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
apex module accepts PlatformCompatConfigIntf as prebuilt,
and places it in the etc folder of the apex.
Test: m
Test: flash device with dummy config in mediaprovider APEX -
the config is present
Change-Id: Ifc62cd262f6c6571c1bf6c2943879aa20877ecad
We add a compat config build rule to extract the merged config, and
then update the droiddoc build rule to consume that.
Test: m -j offline-sdk-docs
Bug: 144927670
Change-Id: Ib1e85f97895c89227882e665572bda9bfc2a8cba
Exempt-From-Owner-Approval: ag/10097965 approved internally, Colin requested to patch to aosp
This creates a single build artifact with all compat config from the build.
Test: m out/soong/compat_config/merged_compat_config.xml
Bug: 144927670
Change-Id: Ie60575469c22c201cf1f4d4c187c03c7212dd26b
The script now expects flags for filenames and no longer
just writes to stdout. Write full merged config too.
Test: m libcore-platform-compat-config
Change-Id: Ia524a8c271725665772c9543baecd4f494ee86f1
Previously, the compat configs from static dependencies were all written
to compat/compat_config.xml, putting at the mercy of jar file merging and
so potentially losing some config.
Now the annotation processor writes a compat_config.xml for each Java
class that exports config, we we merge them together here with a new
tool.
Test: m
Change-Id: I28c12ff648a01aaad214701fca4f09743638b11b
AndroidMkEntries now returns multiple AndroidMkEntires so that a module
can emit multiple Make modules if needed.
Bug: 128708192
Test: m
Change-Id: I56b6f76d22943b80329951c5acb80a1b932441ad
Add a ToMakePath() method that returns a new path that points out
out/ instead of out/soong/, and replace the
"$(OUT_DIR)/" + path.RelPathString()
pattern with
path.ToMakePath().String()
Bug: 141877526
Test: m checkbuild
Change-Id: I391b9f2ed78c83a58d905d48355ce9b01d610d16
Create a new type InstallPath that is similar to OutputPath to
differentiate intermediates output paths from installed output
paths.
RelPathString is a poorly defined, undocumented function that is
primarily used to get an install path relative to out/soong to
generate an equivalent install path for Make relative to $(OUT_DIR).
Move it to InstallPath for now, and fix the one remaining user on
OutputPath.
Add a method to create an NDK install path so that ndk_sysroot.go
doesn't have to do it manually with PathForOutput.
Bug: 141877526
Test: m checkbuild
Change-Id: I83c5a0bd1fd6c3dba8d3b6d20d039f64f353ddd5
This prevents SystemConfig from trying to read them. Also removed ' ' prefix+postfix when creating an empty config.
Bug: 140074769
Bug: 140092095
Test: Flashed device, no more "SystemConfig: Tag compat-change is unknown..." warnings in logcat
Change-Id: I374826526fe3e4555474688b65a0be7253c6dd8c
This includes a few changes that make AndroidMkEntries more resemble
AndroidMkData, especially in terms of how extra entries are added.
Most importantly it can now have multiple custom functions.
Test: Soong tests
Change-Id: Ibf9102624d16d0c1c9894a2794fc7c797bb34c9a
Currently it extracts from the provided jar file compat/compat_config.xml
(generated by compat-changeid-annotation-processor) and installs on
/system/etc/sysconfig.
Future improvements:
- Merge all the configs going for the system image into one, so that
duplicate change ids across modules are failing the build instead of
runtime.
- Support uploading the config onto APEX for APEX modules.
Test: flashed device locally, config files found and read by
com.android.server.compat.CompatConfig.
Bug: 138222363
Change-Id: I64b11fdc466f746702e7e73f612794e024de2288