Commit graph

76421 commits

Author SHA1 Message Date
Paul Duffin
7ac943f7e1 Use --revert-annotation instead of --hide-annotation
Use of `--hide-annotation android.annotation.FlaggedApi` was always an
intermediate solution until the required semantics for `@FlaggedApi`
was determined. The `--revert-annotation` option provides those
semantics. When the `@FlaggedApi` is applied to an existing API, e.g.
because it has moved from system to public, or because it has changed
in some way, e.g. modifiers, then the correct semantics for when that
API is not required is not to hide the API but to revert it to what it
was before the change necessitating the `@FlaggedApi` annotation was
made.

Use --revert-annotation instead of --hide-annotation

Use of `--hide-annotation android.annotation.FlaggedApi` was always an
intermediate solution until the required semantics for `@FlaggedApi`
was determined. The `--revert-annotation` option provides those
semantics. When the `@FlaggedApi` is applied to an existing API, e.g.
because it has moved from system to public, or because it has changed
in some way, e.g. modifiers, then the correct semantics for when that
API is not required is not to hide the API but to revert it to what it
was before the change necessitating the `@FlaggedApi` annotation was
made.
Use --revert-annotation instead of --hide-annotation

Use of `--hide-annotation android.annotation.FlaggedApi` was always an
intermediate solution until the required semantics for `@FlaggedApi`
was determined. The `--revert-annotation` option provides those
semantics. When the `@FlaggedApi` is applied to an existing API, e.g.
because it has moved from system to public, or because it has changed
in some way, e.g. modifiers, then the correct semantics for when that
API is not required is not to hide the API but to revert it to what it
was before the change necessitating the `@FlaggedApi` annotation was
made.

Bug: 314196587
Test: ./gradlew
Change-Id: Ic97f29dd2b9f598ba0851f5f622c2a2724f18037
2023-12-13 00:33:25 +00:00
Wei Li
c1fb159206 Merge "Build native libraries used by layoutlib." into main 2023-12-12 16:18:16 +00:00
Mårten Kongstad
18c95ecab9 Merge "Add exported_java_aconfig_library" into main 2023-12-12 09:46:05 +00:00
Wei Li
5f5d271fc3 Build native libraries used by layoutlib.
Bug: 303904212
Test: m layoutlib dist; CIs
Change-Id: Id77cba97b2f66997431beb78ecc9d9b74b64b803
2023-12-12 05:06:20 +00:00
Treehugger Robot
4e8a7e9974 Merge "Remove extra go.mod files" into main 2023-12-12 04:00:32 +00:00
Colin Cross
e8da10aae0 Remove extra go.mod files
Only the top level build/soong/go.mod file should exist, any extras
breaks `go test ./...` in build/soong, and also breaks the kythe build
that produces xrefs for code search.

Bug: 315537199
Test: go test ./...
Change-Id: Id5262550654ff1559cfb3fa1ecdae95c126109df
2023-12-12 03:02:33 +00:00
Yu Liu
cec0e410cd Support rust modules when packaging aconfig files in apex.
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
2023-12-11 17:43:07 -08:00
Colin Cross
a72573a727 Merge "Remove ConvertWithBp2build implementations" into main 2023-12-11 23:12:53 +00:00
Treehugger Robot
b49f038231 Merge "Add compile_data for android apps" into main 2023-12-11 19:25:20 +00:00
Tor Norbye
2624653aa9 Merge "303434307: Enable flagged API checking" into main 2023-12-11 18:14:56 +00:00
Jeongik Cha
d74c914e36 Fix typo in log in ninja.go
Test: n/a
Bug: 292304818

Change-Id: I6dcb6bb3e84e15292cbd3acc613c744e3ec039f8
2023-12-11 11:41:16 +00:00
Mårten Kongstad
c82f118d23 Add exported_java_aconfig_library
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
2023-12-11 09:51:42 +01:00
Treehugger Robot
5eca978092 Merge "Remove art/test from genrule allowlist" into main 2023-12-09 01:10:55 +00:00
Treehugger Robot
96b6a499d9 Merge "individually escape results of $(locations)" into main 2023-12-09 01:10:51 +00:00
Xin Li
1804e19358 Merge "Merge Android 14 QPR1" into main 2023-12-09 00:11:54 +00:00
Yu Liu
65287d5dc2 Merge "Remove the code for bazel when reading ReleaseAconfigValueSets." into main 2023-12-08 21:52:59 +00:00
Colin Cross
8ff105860d Remove ConvertWithBp2build implementations
Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.

Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
2023-12-08 13:51:05 -08:00
Colin Cross
e51c6e4109 Merge "Remove bp2build and bazel from soong_ui" into main 2023-12-08 21:43:26 +00:00
Xin Li
41968c6c20 Merge Android 14 QPR1
Merged-In: Ide278450fa058b6dc565bff395f541dc7b574905
Bug: 315507370
Change-Id: I1831ca9b459f19974b0030cb019157e803031511
2023-12-08 13:13:06 -08:00
Cole Faust
df1efd7251 Add compile_data for android apps
Compile_data is a property on rust rules to declare extra files
that are used by the compiler. In rust's case this happens commonly
with `include_str!()`.

Other compilers like javac or aapt2 don't often reach out to other
files, so it's not as neccessary. But they will follow symlinks.
We're making a change to only include symlinks themselves in sbox
sandboxes, and the targets of the symlinks must be listed
explicitly. For this, we need compile_data to list the targets
of symlinks.

Bug: 307824623
Test: m out/soong/.intermediates/frameworks/base/tools/aapt2/integration-tests/SymlinkTest/AaptSymlinkTest/android_common/lint/lint-baseline.xml with the symlink change
Change-Id: I33eb9cbe4b6eb25e3f33ea0ac9dade88c3d4a624
2023-12-08 12:34:42 -08:00
Treehugger Robot
f73da3ef78 Merge "rust: add aconfig_flag support" into main am: 5ada6c2738
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2863750

Change-Id: Ide278450fa058b6dc565bff395f541dc7b574905
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 20:05:49 +00:00
Treehugger Robot
5ada6c2738 Merge "rust: add aconfig_flag support" into main 2023-12-08 19:35:28 +00:00
Cole Faust
bcfc299575 Remove art/test from genrule allowlist
go/android-busy-beavers-sandboxing

Bug: 307824623
Test: mm in art/test
Change-Id: Ic37343ad873f71461db984b030f6beda5279207c
2023-12-08 10:57:27 -08:00
Cole Faust
ce74a59bb2 individually escape results of $(locations)
proptools.ShellEscape escapes mostly by surrounding the string in
quotes. This makes all the files from a $(locations) be passed as
one shell argument if escaping was needed. Escape them individually
so that they're still passed as separate arguments.

Bug: 307824623
Test: running art tests with aosp/2860435
Change-Id: I9940941f4a7bb4d29d9388e4d57f8cbd732b6d32
2023-12-08 10:53:59 -08:00
Cole Faust
558e2bd19c Merge "Fix typo in the comment" into main am: 2237d24894
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2865414

Change-Id: I6ecf98ae6cd00dc10518716673acea89f7114f2c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 18:09:10 +00:00
Cole Faust
2237d24894 Merge "Fix typo in the comment" into main 2023-12-08 17:32:43 +00:00
Tor Norbye
cabafdeee0 303434307: Enable flagged API checking
Also downgrade the new UseSdkSuppress check from error to warning.
And temporarily downgrades FlaggedApi from error to warning until
existing violations are resolved.

Test: The build
Bug: 303434307
Change-Id: Id7802621d567815470dee1aeb815abe214f098cd
2023-12-08 15:44:20 +00:00
Jihoon Kang
1ed5d5ca20 Merge changes from topic "aconfig_dump_map" into main am: 25c187cc7d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2854663

Change-Id: I0d9212e36959c7964e6cbff7228b5ff5dabad32a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 10:27:20 +00:00
Jihoon Kang
25c187cc7d Merge changes from topic "aconfig_dump_map" into main
* changes:
  Add aconfig flag support for android_app
  Add aconfig flag value text file in aconfig_declarations provider
2023-12-08 09:48:13 +00:00
Yuichiro Hanada
e42ac1c79b Fix typo in the comment
Bug: None
Test: m soong_docs and check the generated soong_build.html

Change-Id: I72dd87915f8f5225600365d8ef3f6b9c337a5dbc
2023-12-08 12:23:15 +09:00
Cole Faust
08f46ee8d4 Merge "Revert "Handle symlinks in sbox"" into main am: 25861686fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2864655

Change-Id: Ic479fd4e9d4f0fec49ba0e11a52370d2cc4a8d5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 01:24:48 +00:00
Colin Cross
8d411ff8f8 Remove bp2build and bazel from soong_ui
Bug: 315353489
Test: m blueprint_tests
Change-Id: I9df31b18caaae24e3cf2994e56bb90b50523f11e
2023-12-07 17:14:27 -08:00
Cole Faust
25861686fe Merge "Revert "Handle symlinks in sbox"" into main 2023-12-08 00:43:17 +00:00
Yu Liu
95572ff2da Remove the code for bazel when reading ReleaseAconfigValueSets.
Bug: 315353489
Test: CI
Change-Id: I652f78df6d9256cdb35b8b498e20bcb76f1437b3
2023-12-07 16:38:45 -08:00
Jihoon Kang
84b2589e6d Add aconfig flag support for android_app
This change adds an overrideable property flags_packages to android_app,
which is used to list the aconfig_declarations module names that the app
depends on. The build action of android_app is modified to pass all
flags text file provided by the aconfig_declarations to aapt2 link as
--feature-flags arguments.

Test: m nothing --no-skip-soong-tests
Bug: 306024510
Change-Id: I4924f88b9954950cc1936a472cd7ac70f41add5d
2023-12-07 23:01:26 +00:00
Colin Cross
4c803a0355 Merge aconfig files per-module am: d788b3e6cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2860765

Change-Id: Ie43ca8826156ff580618cdeda0337db270a82e62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 22:37:13 +00:00
Jihoon Kang
cca3e0c4b5 Add aconfig flag value text file in aconfig_declarations provider
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
2023-12-07 22:36:08 +00:00
LaMont Jones
0c97185450 rust: add aconfig_flag support
Bug: b/308625757
Test: manual
Change-Id: Ifd98cd0ad4e2525b08f5766e9332991c049162ea
2023-12-07 21:56:59 +00:00
Cole Faust
69b5a5f0bf Revert "Handle symlinks in sbox"
This reverts commit dd9529050d.

Reason for revert: There are at least b/315337725 and b/315036698 issues, reverting this cl while I fix them.

Change-Id: I644bbbe594b9dd53a99a3b6513fbcba68afe0b4a
2023-12-07 21:40:08 +00:00
Colin Cross
d788b3e6cb Merge aconfig files per-module
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
2023-12-07 04:17:37 +00:00
LaMont Jones
78c3daf391 Merge "cc: export LOCAL_ACONFIG_FILES for printflags" into main am: 7dcbf427f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2860706

Change-Id: Ibe4edfa6bd523d8f4d7850e7935a435734c2c2f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 19:16:59 +00:00
LaMont Jones
7dcbf427f9 Merge "cc: export LOCAL_ACONFIG_FILES for printflags" into main 2023-12-06 18:01:17 +00:00
Vilas Bhat
3f2cdb2665 Merge "16k: soong: Update DevicePageSizeAgnostic to DeviceNoBionicPageSizeMacro" into main am: 3ad4cf3a9a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2857828

Change-Id: Ic5d8c2efc8d41b766812d551607f7f6931060a2f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 14:09:16 +00:00
Vilas Bhat
3ad4cf3a9a Merge "16k: soong: Update DevicePageSizeAgnostic to DeviceNoBionicPageSizeMacro" into main 2023-12-06 13:16:19 +00:00
Aleksei Vetrov
d193a77232 Merge "Move NDK ABI monitoring enabling flag to release flags" into main am: fb510be871
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2843703

Change-Id: I1d32fefcbc05e07d1898f2ffbb1888b2947a594b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 12:29:22 +00:00
Aleksei Vetrov
fb510be871 Merge "Move NDK ABI monitoring enabling flag to release flags" into main 2023-12-06 11:11:35 +00:00
Aditya Choudhary
d798f5c879 Merge changes from topic "code_metadata" into main am: 4c3e2df157
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2852607

Change-Id: Icc9c1eda9b93e1ec897425b98cb8f16f83431409
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 08:11:06 +00:00
Aditya Choudhary
7d37796d24 Add Code Metadata rule to soong/testing. am: 8094b6bf9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2786121

Change-Id: I40154b3f9d2c170cb7aacbf6f0b9383b2e87f444
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 08:11:01 +00:00
Aditya Choudhary
4c3e2df157 Merge changes from topic "code_metadata" into main
* changes:
  Add source file provider for genrule/srcs, python libraries and rust libraries.
  Add Code Metadata rule to soong/testing.
2023-12-06 07:37:50 +00:00
Jooyung Han
64a51889e8 Merge "Error if vendor apex adds an LLNDK library" into main am: 2588c54d01
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2858985

Change-Id: I05299415612f82859323831da1acf0c90943d2de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 02:33:55 +00:00