Include all_aconfig_declarations in the sdk dist directory, in both
binary protobuf (for machine consumption) and text protobuf (for human
consumption) format.
Bug: 324281288
Test: m sdk dist && test -e out/dist/flags.pb && test -e out/dist/flags.textproto
Change-Id: Icfb4841c3fe6478ddc233ef6d092ca700a8acb20
In order to easily manage aconfig_declarations modules and their
corresponding codegen modules, this change introduces a new module type
`aconfig_declarations_group`. The module enables listing codegen modules
by language, and correctly depend on the desired output files using
appropriate tags.
e.g. for an aconfig_declarations_group module "some_group", the rdeps of
the module can:
- gather all intermediates cache files of the aconfig_declarations with
":some_group" tag.
- gather generated srcjar files of the listed java_aconfig_library
modules with ":some_group{.srcjars}" tag.
Output tag support for cc modules and rust modules will be added in
future changes.
Test: m nothing --no-skip-soong-tests
Bug: 320492079
Change-Id: I93d737577f8d00198ed91048dd6e81ef238193cb
Update the calls to dump aconfig caches; the new canonical name is
`dump-cache`, though `dump` is still an accepted alias (for now).
Bug: N/A
Test: m all_aconfig_declarations && printflags
Change-Id: I9f82d31666ced6bbd0f195f1422590547114e0f0
aconfig will remove its support for format aliases in an attempt to make
future maintenance easier. Update soong accordingly.
Bug: 317044915
Test: m
Change-Id: I20157ea8c7b441d4e416967d29fc7768c917e688
The CL aosp/2878135 introduced a new shell command to be executed as
part of `m sdk dist` builds. The new command incorrectly used bash
syntax for conditionals, i.e. `if [[ ... ]]` (double [[]]) instead of
the POSIX compliant `if [ ... ]` (single []).
This broke the sdk build on systems where /bin/sh is not a symlink to
/bin/bash:
/bin/sh: 1: [[: not found
error: lstat out/soong/.intermediates/exported_java_aconfig_library.jar.tmp: file does not exist
Fix the breakage by using POSIX shell syntax instead.
Bug: 316933458
Bug: 311151343
Test: m sdk dist
Change-Id: I7de53261674a8f54c4ecacf0e27aecbafcfa4048
The android-flags.jar file is consumed by apps built outside the
platform. These apps should only have access to exported flags (as
defined by the flag_declaration `is_exported` field).
Teach soong to filter out non-exported flags when generating
android-flags.jar.
Bug: 311151343
Test: m sdk dist # manually verify that $(gettop)/out/dist/android-flags.jar only contains exported flags
Change-Id: If66321fcffd920040dae3d99bd7ef69ff6925b18
Add a rule to generate a JAR file containing code for all aconfig flags
in all packages. This is intended for apps compiled outside the
platform.
Also add a rule to include the new JAR file among the SDK artifacts.
Note: a future CL will refine the aconfig command line options used, or
filter the aconfig output: right now the JAR really contains *all*
flags; we want it to include only *exported* flags.
Bug: 311151343
Test: m sdk dist # manually verify that this generates $(gettop)/out/dist/android-flags.jar
Change-Id: I73481a9f723a0e5487cfcd2ee697873ecc4e8275
Alongside with the generated proto file, the aconfig_declaration now
also outputs a text file that lists aconfig flags and values of its
corresponding proto file, in the format as shown below:
```
my.flag1=true
my.flag2=false
...
```
To prevent confusion between the preexisting proto file and the newly
introduced text file, the change also renames the variables of the proto
file from `intermediatePath` to `intermediateCacheOutputPath` and
likewise.
The utilization of the generated text file will be done in the child
changes.
Test: m out/soong/.intermediates/build/make/tools/aconfig/aconfig.test.flags/intermediate.txt && inspect output
Bug: 306024510
Change-Id: Iee16ad57bb87e992a477fc96502f79e971d01233
Passing the list of all transitive aconfig files to Make causes extra
Kati analysis runs when dependencies are changed in Android.bp files.
Since Make is going to merge them anyways, merge them per-module and
pass a single aconfig file to Make for each module.
Fixes: 313698230
Test: m out/target/product/vsoc_x86_64/system/etc/aconfig_flags.pb
Change-Id: Ifde4826bc93bc06e40338f72b4cb39eed26ca08d
Correct comments. Remove unnecessary dependency on soong_zip from
cc_aconfig_library and rust_aconfig_library.
Bug: N/A
Test: m nothing
Change-Id: Ifabeed537d596ec879bf8c7dfb8a68824464f6dd
Aconfig provides new argument, default-permission, for create-cache.
When buld aconfig_declarations, aconfig_declarations will read the value
from release configuration to pass this value to aconfig.
Bug: 294417368
Test: presubmit
Change-Id: Id55dab1d757e2366a62449c73e2497cc958c5e78
rust_aconfig_library generates src/lib.rs and uses it to build library variants (dylib, rlib-rlib_std, and rlib-dylib_std) as of what `rust_library` produces
Test: go test
Change-Id: I6c4603691d4306c463c2e9521f5c11c30765b1e3
Bug: b/292128421
Test: Create a aconfig declartion file with only package name
but no flags. Then build the corresponding java library.
Change-Id: I7e9d09d5488eb9c95784fd486d3a9107539412a4
The generated module lets us keep the aconfig code in its own pacakge
and not infect all of the cc package with aconfig. It's also closer
to what bazel is going to do
Bug: 283479529
Test: m aconfig_hello_world_cc && adb push $TOP/out/target/product/panther/system/bin/aconfig_hello_world_cc /system/bin && adb shell aconfig_hello_world_cc
Change-Id: I2fb9e419939c7ca77b111da9c376af077e2348a9
Aconfig take declarations as separate arguments if there are multiple
declaration files.
Bug: 291926035
Test: build flags
Change-Id: Ic0d069184f48ceaf8947acc5b951eecff7c308f9
Bug: 283910439
Test: m dist ; m all_aconfig_declarations ; gqui from all_aconfig_declarations.pb proto /source/aosp-master-with-phones/build/make/tools/aconfig/protos/aconfig.proto:android.aconfig.parsed_flags
Change-Id: Ia89c7f9c53fa1600fa2f9c8ea01319e949e09f58
Bug: 285303012
Test: for x in next trunk trunk_food trunk_staging ; do lunch aosp_panther-$x-eng ; m nothing ; done
Change-Id: I3375f46b3ecbbc516d1bee6ab3f80725fcccde8f