aboutsummaryrefslogtreecommitdiff
path: root/aconfig/init.go
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Support aconfig stoage files for apex." into mainYu Liu2024-02-211-0/+8
|\
| * Support aconfig stoage files for apex.Yu Liu2024-02-171-0/+8
| | | | | | | | | | | | Bug: 323071835 Test: unit tests and manual build test. Change-Id: I4a1a05b3afdf88058a970040b3f176f36c5c8037
* | Include all_aconfig_declarations in sdk distMårten Kongstad2024-02-201-0/+7
|/ | | | | | | | | | 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
* Introduce module type aconfig_declarations_groupJihoon Kang2024-02-141-0/+14
| | | | | | | | | | | | | | | | | | | | | | 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
* Add dedup flag to aconfig dump-cache calls.Yu Liu2024-02-081-3/+3
| | | | | | Bug: None Test: CI Change-Id: I34a73576a7a7ea43178895049a0f7dbcd9e329bc
* Change `aconfig dump` to `aconfig dump-cache`Mårten Kongstad2023-12-211-3/+3
| | | | | | | | | 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
* Merge "Replace `aconfig dump --format=bool` with explicit format string" ↵Mårten Kongstad2023-12-211-1/+1
|\ | | | | | | into main
| * Replace `aconfig dump --format=bool` with explicit format stringMårten Kongstad2023-12-191-1/+1
| | | | | | | | | | | | | | | | | | 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
* | move CollectDependencyAconfigFiles to androidLaMont Jones2023-12-191-5/+0
|/ | | | | | | | This needs to be called by some modules in android. Bug: 308625757 Test: manual Change-Id: I389fcfd88a3f4bd85a9218fdd4dd66d8a239bb67
* Fix broken sdk build (/bin/sh: 1: [[: not found)Mårten Kongstad2023-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | 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
* Only include exported flags in android-flags.jarMårten Kongstad2023-12-181-1/+9
| | | | | | | | | | | | | 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 exported_java_aconfig_libraryMårten Kongstad2023-12-111-0/+15
| | | | | | | | | | | | | | | | 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
* Add aconfig flag value text file in aconfig_declarations providerJihoon Kang2023-12-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | 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
* Merge aconfig files per-moduleColin Cross2023-12-071-0/+6
| | | | | | | | | | | 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
* Add container property to aconfig_declarations.Yu Liu2023-11-281-50/+1
| | | | | | Bug: 311155208 Test: Unit test Change-Id: I7b187138856d0144203961e82b6dad5e2f8eed9d
* aconfig/init.go: fix copy and paste mistakesMårten Kongstad2023-11-201-5/+4
| | | | | | | | | 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
* build system implementation for c/cpp test mode codegenDennis Shen2023-09-201-1/+2
| | | | | | Bug: b/300488560 Test: added unit test and tested with AconfigDemoActivity app Change-Id: I6ad71cc2dada8feb53662ec47c8acad5bc43d5ce
* Support aconfig_declarations, aconfig_values and aconfig_value_setYu Liu2023-09-091-2/+2
| | | | | | Bug: 297356603 Test: Unit tests Change-Id: I2f797578a35322440db0f281b4d46b6652512e00
* Merge "Support default-permission in aconfig_declarations" into mainZhi Dou2023-08-141-1/+2
|\
| * Support default-permission in aconfig_declarationsZhi Dou2023-08-101-1/+2
| | | | | | | | | | | | | | | | | | | | 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
* | Merge "Implement rust_aconfig_library" into mainDennis Shen2023-08-101-0/+16
|\ \ | |/ |/|
| * Implement rust_aconfig_libraryVinh Tran2023-08-081-0/+16
| | | | | | | | | | | | | | 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
* | Compare generated cache file with existing cache fileZhi Dou2023-07-281-1/+1
|/ | | | | | | | 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
* Add test mode for java config modulesJoe Onorato2023-07-281-1/+2
| | | | | | Test: soong unit tests, verify output files are correct Bug: 288632682 Change-Id: If5a6c916104e60e3688f5614b7420138e1a6323e
* Add aconfig flags and a generic generated library plugin module for ccJoe Onorato2023-07-211-1/+16
| | | | | | | | | | 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
* Pass declarations as separate argumentsZhi Dou2023-07-191-2/+2
| | | | | | | | | Aconfig take declarations as separate arguments if there are multiple declaration files. Bug: 291926035 Test: build flags Change-Id: Ic0d069184f48ceaf8947acc5b951eecff7c308f9
* Add aconfig dump of all aconfig_declarations modules.Joe Onorato2023-06-231-0/+10
| | | | | | 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
* Rename device_config --> aconfig and definitions --> declarationsJoe Onorato2023-06-211-0/+70
Bug: 285303012 Test: for x in next trunk trunk_food trunk_staging ; do lunch aosp_panther-$x-eng ; m nothing ; done Change-Id: I3375f46b3ecbbc516d1bee6ab3f80725fcccde8f