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
* changes:
Convert ModuleProvder to generic providers API
Convert OtherModuleProvider to generic providers API
Convert Provider to generic providers API
Convert SetProvider to generic providers API
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
Convert all of the callers of ModuleProvider/ModuleHasProvider to use the
type-safe android.SingletonModuleProvider API.
Bug: 316410648
Test: builds
Change-Id: I6f11638546b64749e451cebbf33140248dc1d193
Convert all of the callers of OtherModuleProvider/OtherModuleHasProvider
to use the type-safe android.OtherModuleProvider API.
Bug: 316410648
Test: builds
Change-Id: Id77f514d68761a262d9ea830a601dbed804bbbe5
Convert all of the callers to NewProvider and NewMutatorProvider
to use a generic type parameter instead of an example object.
Bug: 316410648
Test: builds
Change-Id: Ic9cdafc87336e26730d3fd596df05de0e7267542
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.
Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
Also remove the code to package aconfig files for transitive
dependencies since those files should have already been included in the
direct dependencies.
Bug: 311173471
Test: Unit tests
Change-Id: I25637af9381f71a78b70a8de9894618188c9735d
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
Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.
Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
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
More might be added later when we have an allowlist.
Bug: 305998969
Test: b build with the change in ag/25094394
Change-Id: I92df843ac81f4e33ce7506db61c989a380015975
Bug: 304814040
Test: CI, unit test,
b build build/make/tools/aconfig:aconfig.test.cpp
b test build/make/tools/aconfig:AconfigJavaHostTest
Change-Id: I9ca939348a063c39e9528f24e788f9757458d30c
This no-op refactoring facilitates some upcoming functional changes for
"bp2build allowlist v2". The work requires that the bp2build conversion
mutator be changed from a TopDown mutator to a BottomUp mutator.
Refactoring all bp2build-related methods so that they use Bp2buildMutatorContext
makes it easier to make this functional change without touching tens of
files and multiple projects.
Bug: 285631638
Test: m bp2build
Change-Id: I3d1ef3064146e959c6f0dc315350fc9764bf2bd2
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