Tor Norbye
2624653aa9
Merge "303434307: Enable flagged API checking" into main
2023-12-11 18:14:56 +00: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
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
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
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
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
26df39fe44
Add source file provider for genrule/srcs, python libraries and rust libraries.
...
Change-Id: I2d7d4684a10c15aeecc27b8db800ab27a807d2e2
2023-12-05 19:56:26 +00:00
Aditya Choudhary
8094b6bf9d
Add Code Metadata rule to soong/testing.
...
This Cl adds a new rule to Soong to generate code ownership metadata. Also, this CL adds a provider in the Java SDK library to provide generated source files to the Code_metadata rule. Will add providers to other libraries in the future changes.
Bug: 296873595
Change-Id: Ic2e43aa9b161231fea4416d1f0d36b778361d7c5
2023-12-05 18:10:03 +00:00
Colin Cross
078254139c
Merge "Add TestContext parameter to ContentFromFileRuleForTests" into main am: 2998c33d43
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817720
Change-Id: Iaf65c68d8c427a5d991401f85bd1c220b2303a9b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-12-05 01:37:56 +00:00
Colin Cross
2998c33d43
Merge "Add TestContext parameter to ContentFromFileRuleForTests" into main
2023-12-05 00:29:10 +00:00
Colin Cross
f61d03d241
Add TestContext parameter to ContentFromFileRuleForTests
...
The next CL will need a TestContext parameter in
ContentFromFileRuleForTests in order to retrieve the file rule contents
from the Config. Add it and update all the tests that use it in order
to simply review of the next CL.
Bug: 306029038
Test: go test ./...
Change-Id: Ia4b4c9854017ea3472fa2f8ba42cf7f72720496e
2023-12-03 17:22:56 -08:00
Serdar Kocdemir
96e84f84ac
Merge "Revert^3 "Enable dex container (DEX v41) for the whole system"" into main am: 3d11d51733
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2852551
Change-Id: Ideb430cdb884fde634ff497108ba63228e3bc3f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-12-01 16:22:21 +00:00
Serdar Kocdemir
3d11d51733
Merge "Revert^3 "Enable dex container (DEX v41) for the whole system"" into main
2023-12-01 15:39:47 +00:00
Serdar Kocdemir
0968a93679
Revert^3 "Enable dex container (DEX v41) for the whole system"
...
This reverts commit e4d0e949ce
.
Reason for revert: test monitor b/314212435
Change-Id: I53cd60d82f432d4eff132b5ee28227ece1ded7af
2023-12-01 13:33:11 +00:00
David Srbecky
0cc9d2673f
Merge "Revert^2 "Enable dex container (DEX v41) for the whole system"" into main am: 8e1efb7fc5
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2853426
Change-Id: I9f247846eb500eeee8cadae6e8f6b2cd9dc58aa8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-30 23:42:04 +00:00
David Srbecky
8e1efb7fc5
Merge "Revert^2 "Enable dex container (DEX v41) for the whole system"" into main
2023-11-30 22:50:55 +00:00
Yu Liu
4d6d371aee
Merge "Add container property to aconfig_declarations." into main am: 9dc6b1025d
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2835990
Change-Id: I462e13fb5ca1132dce4751afdd91d9b144f6a283
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-30 22:14:19 +00:00
Yu Liu
9dc6b1025d
Merge "Add container property to aconfig_declarations." into main
2023-11-30 21:33:34 +00:00
David Srbecky
e4d0e949ce
Revert^2 "Enable dex container (DEX v41) for the whole system"
...
This reverts commit 432fbfa848
.
Reason for revert: Reland
Test: device boots
Change-Id: I95e2ae124c6d4a74ca5303f898583de992b15cbd
2023-11-30 15:07:01 +00:00
Colin Cross
c65780626c
Merge "Don't write transitive dependencies to Android-${TARGET_PRODUCT}.mk" into main am: 556ba81849
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2842060
Change-Id: I854bc7c67d7d4525fef42b031ad0b9a9c9080643
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-30 01:26:48 +00:00
Colin Cross
556ba81849
Merge "Don't write transitive dependencies to Android-${TARGET_PRODUCT}.mk" into main
2023-11-30 00:41:43 +00:00
Treehugger Robot
26539fd5e8
Merge "Support experimental building with OpenJDK 21" into main am: 8f7ee30d21
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2853425
Change-Id: I9bcd13d2b770982a638b41cd82284c96e8293186
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-29 21:19:28 +00:00
Treehugger Robot
8f7ee30d21
Merge "Support experimental building with OpenJDK 21" into main
2023-11-29 20:25:25 +00:00
Ramya Subramanian
ff5cf349f5
Merge "Revert "Enable dex container (DEX v41) for the whole system"" into main am: 29e05d1007
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2853365
Change-Id: Iecfcf43f2809a8249c59adeb8092902152f61b51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-29 19:54:32 +00:00
Ramya Subramanian
29e05d1007
Merge "Revert "Enable dex container (DEX v41) for the whole system"" into main
2023-11-29 19:38:50 +00:00
Sorin Basca
0760c89882
Support experimental building with OpenJDK 21
...
Use EXPERIMENTAL_USE_OPENJDK21_TOOLCHAIN=true to build with OpenJDK 21
while still targeting java language version 17.
Bug: 313924276
Test: m EXPERIMENTAL_USE_OPENJDK21_TOOLCHAIN=true
Change-Id: Idc892bb7519e597f1e280ca0765c1a281bb29955
2023-11-29 19:13:55 +00:00
Ramya Subramanian
432fbfa848
Revert "Enable dex container (DEX v41) for the whole system"
...
This reverts commit b82a2a278b
.
Reason for revert: DroidMonitor: Potential culprit for multiple Module failures on ATH. verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.”.
Change-Id: I3899a45cce259c4ee38572e76f4735eccb3ca66a
2023-11-29 18:34:31 +00:00
Colin Cross
312634eb0f
Don't write transitive dependencies to Android-${TARGET_PRODUCT}.mk
...
Java libraries were writing lists of files that changed whenever
transitive dependencies changed to Android-${TARGET_PRODUCT}.mk, causing
Kati analysis to rerun whenever a dependency was changed in Soong.
In both cases, Make would immediately use the list to write a single
output file. Write the files in Soong and pass the path to the file
to Make instead, which will both reduce the size of
Android-${TARGET_PRODUCT}.mk and skip Kati analysis more often.
Bug: 309006256
Test: m checkbuild
Change-Id: I5dff16c6fb7cca8c6da927b37c612c7b1d0954e6
2023-11-29 10:31:13 -08:00
Anas Sulaiman
7eb74575b5
Merge "allow specifying remote caching opt for rewrapper" into main am: 80117e6c4f
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2838517
Change-Id: I3d3a9a4a05d364ac88277e6a0e2e9904c21e467d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-29 18:07:57 +00:00
Anas Sulaiman
80117e6c4f
Merge "allow specifying remote caching opt for rewrapper" into main
2023-11-29 16:36:21 +00:00
Jiakai Zhang
36c8b1d229
Merge "Remove PreoptExtractedApk." into main am: ba45ba5763
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2848255
Change-Id: I627974d669b4e978ff555553fa94fd5bfc63f7c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-29 10:50:42 +00:00
Rico Wind
77379a479f
Merge "Reapply "Use R8 for resource shrinking"" into main am: 2f6b403ccd
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2846953
Change-Id: I787623b4073f8c550f6d94ff0855fda873167d0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-29 10:50:13 +00:00
Jiakai Zhang
ba45ba5763
Merge "Remove PreoptExtractedApk." into main
2023-11-29 10:17:29 +00:00
Rico Wind
98e7fa8db1
Reapply "Use R8 for resource shrinking"
...
This reverts commit a9fd59a7f2
.
We are moving the resource shinking pipeline into r8 (gennerally, not just for platform)
This disables the usage of the resource shrinker cli from cmd-line tools
There are no changes in this cl compared to the original land, the fix
was done in R8 (to use the same compression for res folder entries as
in the original)
Bug: 308710394
Bug: 309078004
Test: Existing, validated that resource table on SystemUI was byte<>byte equal, validated uncompression
Merged-In: Ib8a6fb128084e994325b975c46a036cb41494654
Change-Id: Id45b170dd50f75bc87e21ad03b2d0679efb7adc2
2023-11-29 05:07:50 +00:00
Treehugger Robot
66dd52b74d
Merge "Enable dex container (DEX v41) for the whole system" into main am: 7d813e0dba
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2238838
Change-Id: I166e8dfcb9e7ad9bfd4c4edfae56beb9215d8680
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-29 01:07:05 +00:00
Anas Sulaiman
9d7a36d17f
allow specifying remote caching opt for rewrapper
...
This is needed to enable local execution via reproxy for metalava
actions for developer builds without causing permissions errors
and without disabling it for other actions.
Bug: b/308154125
Tested: ran a local build and verified all metalava actions were
executed locally without attempting to write to the remote cache.
Change-Id: Ia6f616e1ff5d0c71597ebf688765925ac81d19c3
2023-11-29 00:42:08 +00:00
Yu Liu
eae7b36699
Add container property to aconfig_declarations.
...
Bug: 311155208
Test: Unit test
Change-Id: I7b187138856d0144203961e82b6dad5e2f8eed9d
2023-11-28 12:37:02 -08:00
Jiakai Zhang
db93553b02
Remove PreoptExtractedApk.
...
This was added by r.android.com/513843 to force dexpreopt some GMS core
modules even if dexpreopt is disabled, to avoid some memory usage
regression. We no longer need it because dexpreopt is never disabled on
production builds.
Bug: 313505540
Test: m
Change-Id: I605b7569c17ee715cd4df167768e25aaf51bcd37
2023-11-28 13:40:58 +00:00
Søren Gjesse
b82a2a278b
Enable dex container (DEX v41) for the whole system
...
Bug: b/249922554
Test: device boots
Change-Id: Idc63034cc7d5f4bc4533d1f580eeffe1494b56a6
2023-11-28 13:24:21 +00:00
David Srbecky
efb785c929
Merge "Change position of R8/D8 flags on the command line." into main am: ea5bb25378
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2845918
Change-Id: Ib2480ac6ccc8ac459cbc9f38bc8c909bf8dfc109
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-27 16:28:40 +00:00
Jamie Garside
b5429e879e
Add the ability for a java_sdk_library to depend on another. am: e570ace2e4
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2844082
Change-Id: Iac17dd61875b799fbf6d399401beffc89d463e9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-27 16:15:50 +00:00
David Srbecky
ea5bb25378
Merge "Change position of R8/D8 flags on the command line." into main
2023-11-27 15:44:04 +00:00
David Srbecky
bda964cf90
Change position of R8/D8 flags on the command line.
...
The wrapper script requires that all -J* options are passed first.
Test: m
Change-Id: Idd1da394c8a46db3485a1b31284eb6f398e3ba27
2023-11-27 14:27:45 +00:00
Jamie Garside
e570ace2e4
Add the ability for a java_sdk_library to depend on another.
...
This simply exports all of the uses_libs: [] libraries into a
"dependency=''" statement in the generated XML file (with the <library>
stanza in it).
Test: `go test` in java/
Bug: 184396657
NOTE FOR REVIEWERS - original patch and result patch are not identical.
PLEASE REVIEW CAREFULLY.
Diffs between the patches:
func formattedDependenciesAttribute(dependencies []string) string {
> + if dependencies == nil {
> + return ""
> + }
> + return fmt.Sprintf(` dependency=\"%s\"\n`, strings.Join(dependencies, ":"))
> +}
> +
> + dependenciesAttr := formattedDependenciesAttribute(module.properties.Uses_libs_dependencies)
> + dependenciesAttr,
> --- java/sdk_library_test.go
> +++ java/sdk_library_test.go
> +
> +func TestSdkLibraryDependency(t *testing.T) {
> + result := android.GroupFixturePreparers(
> + prepareForJavaTest,
> + PrepareForTestWithJavaSdkLibraryFiles,
> + FixtureWithPrebuiltApis(map[string][]string{
> + "30": {"bar", "foo"},
> + }),
> + ).RunTestWithBp(t,
> + `
> + java_sdk_library {
> + name: "foo",
> + srcs: ["a.java", "b.java"],
> + api_packages: ["foo"],
> + }
> +
> + java_sdk_library {
> + name: "bar",
> + srcs: ["c.java", "b.java"],
> + libs: [
> + "foo",
> + ],
> + uses_libs: [
> + "foo",
> + ],
> + }
> +`)
> +
> + barPermissions := result.ModuleForTests("bar.xml", "android_common").Rule("java_sdk_xml")
> +
> + android.AssertStringDoesContain(t, "bar.xml java_sdk_xml command", barPermissions.RuleParams.Command, `dependency=\"foo\"`)
> +}
Original patch:
diff --git a/java/sdk_library.go b/java/sdk_library.go
old mode 100644
new mode 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1993,6 +1993,7 @@
Min_device_sdk *string
Max_device_sdk *string
Sdk_library_min_api_level *string
+ Uses_libs_dependencies []string
}{
Name: proptools.StringPtr(module.xmlPermissionsModuleName()),
Lib_name: proptools.StringPtr(module.BaseModuleName()),
@@ -2002,6 +2003,7 @@
Min_device_sdk: module.commonSdkLibraryProperties.Min_device_sdk,
Max_device_sdk: module.commonSdkLibraryProperties.Max_device_sdk,
Sdk_library_min_api_level: &moduleMinApiLevelStr,
+ Uses_libs_dependencies: module.usesLibraryProperties.Uses_libs,
}
mctx.CreateModule(sdkLibraryXmlFactory, &props)
@@ -2968,6 +2970,11 @@
//
// This value comes from the ApiLevel of the MinSdkVersion property.
Sdk_library_min_api_level *string
+
+ // Uses-libs dependencies that the shared libra
[[[Original patch trimmed due to size. Decoded string size: 3559. Decoded string SHA1: 67fbd040aa818732a686514c4556850c8c36dc8d.]]]
Result patch:
diff --git a/java/sdk_library.go b/java/sdk_library.go
index fb27812..fbfe509 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1993,6 +1993,7 @@
Min_device_sdk *string
Max_device_sdk *string
Sdk_library_min_api_level *string
+ Uses_libs_dependencies []string
}{
Name: proptools.StringPtr(module.xmlPermissionsModuleName()),
Lib_name: proptools.StringPtr(module.BaseModuleName()),
@@ -2002,6 +2003,7 @@
Min_device_sdk: module.commonSdkLibraryProperties.Min_device_sdk,
Max_device_sdk: module.commonSdkLibraryProperties.Max_device_sdk,
Sdk_library_min_api_level: &moduleMinApiLevelStr,
+ Uses_libs_dependencies: module.usesLibraryProperties.Uses_libs,
}
mctx.CreateModule(sdkLibraryXmlFactory, &props)
@@ -2968,6 +2970,11 @@
//
// This value comes from the ApiLevel of the MinSdkVersion property.
Sdk_library_min_api_level *string
+
+ // Uses-libs dependencies that the shared library
[[[Result patch trimmed due to size. Decoded string size: 3614. Decoded string SHA1: b5730ecbeeaad420439ddb67eaaa9150ede94585.]]]
Change-Id: I73f69e2a4573e416492f68e083fe739f3f75b721
2023-11-27 12:07:36 +00:00
Treehugger Robot
baed9d5a57
Merge "Use result.Config.PrebuiltOS() to get prebuiltHost in test_spec_test" into main am: 9be9a126d1
...
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2841420
Change-Id: I5b7d56846f7bac5b4a77745e8638ce2412aaa935
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2023-11-22 02:06:49 +00:00