Commit Graph

7844 Commits

Author SHA1 Message Date
Colin Cross
2998c33d43 Merge "Add TestContext parameter to ContentFromFileRuleForTests" into main 2023-12-05 00:29:10 +00:00
Joe Onorato
3fefc23391 Add accessor function for bool product variables.
Test: treehugger
Change-Id: If6a59ba140d28696d1411ee5b5fcfc4fc0e97926
2023-12-04 17:36:22 +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
Colin Cross
b830249f4d Merge "Move test data installation to Soong" into main am: 0d5dd390c6 am: 5eaf8b8e73 am: f8c3d2f72e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2834993

Change-Id: I21ddc9e4b0e5aafea62e54ba9e5ec0259d600928
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 20:31:22 +00:00
Colin Cross
0d5dd390c6 Merge "Move test data installation to Soong" into main 2023-12-01 18:56:01 +00:00
Roshan Pius
66b10a7ffa Merge "soong(nfc): Create framework-nfc sdk library" into main 2023-12-01 17:12:39 +00:00
Yu Liu
01b9a3cfc9 Merge "Add container property to aconfig_declarations." into main am: 9dc6b1025d am: 4d6d371aee am: 34b5c38c44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2835990

Change-Id: Ibeed93cf217168eeecf9568d1c3c3a5ee568327f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-30 23:07:44 +00:00
Colin Cross
5c1d5fb21b Move test data installation to Soong
To generate module-info.json in Soong for b/309006256 Soong needs to
know the test data paths. Moving test data installation into Soong will
also help later for test suite packaging.

Add ModuleContext.InstallTestData that installs the files listed in a
[]DataPath alongside the test.  The files will also be passed to Make
to allow it to continue packaging them into the test suites for now.

Update the module types that are producing LOCAL_TEST_DATA entries
in their Android.mk files to go through InstallTestData instead.

Bug: 311428265
Test: atest --host toybox-gtests --test-timeout=120000
Change-Id: Ia8b964f86e584ea464667fd86a48d754d118bead
2023-11-30 13:38:49 -08:00
Yu Liu
9dc6b1025d Merge "Add container property to aconfig_declarations." into main 2023-11-30 21:33:34 +00:00
Justin Yun
41cbb5e9b5 Define __ANDROID_VENDOR_API__
cc modules can use __ANDROID_VENDOR_API__ to read BOARD_API_LEVEL
that is the API level of the vendor surface.

Bug: 313822931
Test: check ninja commands to have -D__ANDROID_VENDOR_API__=<version>
Change-Id: Iceb5918cbfce0f24929d02d7e3caf1e9942b88e8
2023-11-30 05:26:12 +00:00
Colin Cross
76175f9752 Merge "Don't write license data to Android-${TARGET_PRODUCT}.mk" into main am: 74656ccf35 am: 6d3474d64c am: 1bcfdaddf1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2842061

Change-Id: I8c7052f2d791644cd8020472d1b033121c55faf7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 00:01:14 +00:00
Colin Cross
74656ccf35 Merge "Don't write license data to Android-${TARGET_PRODUCT}.mk" into main 2023-11-28 22:51:32 +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
Yi-Yo Chiang
5d721357ae Merge "Deprecate BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK" into main am: 62093cf7fc am: 04e00f621e am: d50fd52c4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2845654

Change-Id: Iff6ad967d6181d25275834e77ae72501dd7a6b97
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-28 02:14:25 +00:00
Yi-Yo Chiang
62093cf7fc Merge "Deprecate BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK" into main 2023-11-28 00:38:44 +00:00
Treehugger Robot
8c17083f22 Merge "Remove google_clockwork list of soong plugins" into main am: 63e3ecbaa3 am: 19169c90b7 am: 20eac3059b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2847995

Change-Id: I056a090d2601652dc940959537902cf9f02fc993
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-27 23:54:19 +00:00
Cole Faust
77beb6f12a Remove google_clockwork list of soong plugins
The only plugin in that list has been removed.

Bug: 307824623
Test: Presubmits
Change-Id: Ieceb8610cfb2425500659a009703895a4f499cb1
2023-11-27 12:29:55 -08:00
Yi-Yo Chiang
939fe1a751 Deprecate BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK
These variables are no longer used. We don't build GKI in the platform
tree anymore. Remove these vars as we are not maintaining these.

Bug: 229701033
Test: presubmit
Change-Id: I7551aa37a049f3bc9252559a18feb0f6bdf0a548
2023-11-24 15:07:21 +08:00
Colin Cross
a16bd6b714 Don't write license data to Android-${TARGET_PRODUCT}.mk
All the necessary license data is already propagated through the license
metadata file, and the entries in Android-${TARGET_PRODUCT}.mk are not
used.  Remove them, which should both reduce the size and parsing cost
of the Android-${TARGET_PRODUCT}.mk file and also removes a variable
that changes when dependencies are added or removed, which will
eventually allow running kati less often.

Bug: 309006256
Test: No change to out/Android-aosp_cf_x86_64_phone.ninja
Change-Id: Idfeb6fd10d77497ca274f8e74fe8e994ce1cafe6
2023-11-21 15:27:44 -08:00
Colin Cross
4e7f581719 Merge changes I65b06238,I1ebef60a into main am: 29deca77ce am: 206329779d am: c2c9ee6554
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2834992

Change-Id: I1c317bf07ddd80ffc0185e311a795e1528434986
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-20 21:43:26 +00:00
Colin Cross
d442a0e882 Add DataPath.ToRelativeInstallPath
Add a method to DataPath that converts it to the relative install path
in preparation for adding additional complexity to DataPath.

Bug: 311428265
Test: builds
Change-Id: I65b06238aafda2db72c6a253744a3087976451cd
2023-11-17 19:06:50 -08:00
Colin Cross
09ad3a6505 Change deps of ctx.Install* from Paths to InstallPaths
Installed files should only depend on other installed files, change
the deps arguments of the ctx.Install* methods from Paths to
InstallPaths.

Bug: 311428265
Test: builds
Change-Id: I1ebef60a943bdbe907744cc43aa985371ac56d32
Merged-In: I1ebef60a943bdbe907744cc43aa985371ac56d32
2023-11-17 19:06:43 -08:00
Colin Cross
db25366860 Merge "Change deps of ctx.Install* from Paths to InstallPaths" into main 2023-11-17 23:29:34 +00:00
Roshan Pius
a68c2e9748 Merge "soong(nfc): Create framework-nfc sdk library" into main 2023-11-17 22:43:35 +00:00
Roshan Pius
a966a35e94 soong(nfc): Create framework-nfc sdk library
Using `framework-location` as reference.

Ignore-AOSP-First: Submitting separately to avoid merge conflicts. See
aosp/2828288
Bug: 303286040
Test: Device boots up after flashing
Test: atest CtsNfcTestCases

Change-Id: I309e76165f5563147dde5e581316ee4ac463fbc4
2023-11-17 14:40:20 -08:00
Roshan Pius
92307ffa58 soong(nfc): Create framework-nfc sdk library
Splits out the NFC API classes that are going to be part of NFC mainline
module. Uses `framework-location` as reference.

Bug: 303286040
Test: Device boots up after flashing
Test: atest CtsNfcTestCases
Merged-In: I309e76165f5563147dde5e581316ee4ac463fbc4
Change-Id: I309e76165f5563147dde5e581316ee4ac463fbc4
2023-11-17 22:37:59 +00:00
Spandan Das
3a48e11867 Merge "Skip error check if allow missing deps is true" into main am: 9915e03018 am: 31f8a122e4 am: 88d3e5a93d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2835006

Change-Id: I9b4d1cfbf5d1c273ff2147c95b01f87573a95df5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 21:07:23 +00:00
Spandan Das
9915e03018 Merge "Skip error check if allow missing deps is true" into main 2023-11-17 19:42:10 +00:00
Colin Cross
5fcd83edaa Change deps of ctx.Install* from Paths to InstallPaths
Installed files should only depend on other installed files, change
the deps arguments of the ctx.Install* methods from Paths to
InstallPaths.

Bug: 311428265
Test: builds
Ignore-AOSP-First: resolving conflict
Change-Id: I1ebef60a943bdbe907744cc43aa985371ac56d32
2023-11-17 11:05:39 -08:00
Spandan Das
2daded460c Skip error check if allow missing deps is true
Fixes: 311711411
Test: will use go/abtd
Change-Id: I6df6c679e3f122bbca317d16f89cca2ffc982794
2023-11-17 18:58:48 +00:00
Alyssa Ketpreechasawat
4217b56588 Merge "Revert "Revert "Added new framework-pdf jar inside MediaProvider..."" into main am: afd6963ab4 am: 103a95acf9 am: 7d0fd015a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2822534

Change-Id: I6375050c50478f0872fe3a24c6d2e4d9490a742c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 11:40:05 +00:00
Jihoon Kang
b02789c513 Merge "Revert^2 "Modify conditionals for BuildFromTextStub()"" into main am: d8dd46e5be am: 99b1e8133d am: 6213c4c7b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2835958

Change-Id: I989b30ed6aeb1f23cbce8165fe1c6e3306b22dd3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 11:39:14 +00:00
Alyssa Ketpreechasawat
afd6963ab4 Merge "Revert "Revert "Added new framework-pdf jar inside MediaProvider..."" into main 2023-11-17 10:30:16 +00:00
Jihoon Kang
b4e5ddd22d Merge "Revert "Modify conditionals for BuildFromTextStub()"" into main am: 88d5104ca1 am: a7fa500d0b am: e05655ac90
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2835871

Change-Id: I2f0c0b01598cd30ffd6ac0897b1fb48bf2ad39b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 02:08:21 +00:00
Treehugger Robot
940c7fb0c5 Merge "Modify conditionals for BuildFromTextStub()" into main am: 72a8cee8fe am: 404fd1cce8 am: 48cbd06e68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2832580

Change-Id: Id507ee1e8ba631427eac3a3a74de2929c5d15766
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 02:07:49 +00:00
Jihoon Kang
c1b04d6bc1 Revert^2 "Modify conditionals for BuildFromTextStub()"
This change modifies config.BuildFromTextStub() to return false when
deviceConfig.BuildFromSourceStub() is set to true.

This change resubmits https://r.android.com/2832580.

Test: m nothing
Bug: 311203379
Change-Id: I832364c3c42556e2b3aede2316e8927fd7163e91
2023-11-17 01:49:55 +00:00
Jihoon Kang
77f6ca4919 Revert "Modify conditionals for BuildFromTextStub()"
Revert submission 2832580-sdk-from-source-stub

Reason for revert: Breaking sdk builds
Reverted changes: /q/submissionid:2832580-sdk-from-source-stub

Change-Id: I447e0832950a1aa91df0aed348bdec01528d568d
2023-11-17 00:58:40 +00:00
Jihoon Kang
33e39ae583 Modify conditionals for BuildFromTextStub()
This change modifies config.BuildFromTextStub() to return false when
deviceConfig.BuildFromSourceStub() is set to true.

Test: m nothing
Bug: 311203379
Change-Id: I3b56881fbe2565da20e23470398bf6550c618fb0
2023-11-16 23:02:47 +00:00
Colin Cross
ed268f0403 Merge "Split *ModuleContext out of module.go" into main am: 8d25afd575 am: 516edfa5dd am: 526787aea7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2832037

Change-Id: I25fb993614f2a7e52efe883963d76b77ff7f5308
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 23:47:18 +00:00
Colin Cross
8d25afd575 Merge "Split *ModuleContext out of module.go" into main 2023-11-15 22:05:43 +00:00
Colin Cross
69452e14a3 Split *ModuleContext out of module.go
Move EarlyModuleContext, BaseModuleContext and ModuleContext out of
module.go and into early_module_context, base_module_context and
module_context.go respectively.

Test: builds
Change-Id: I52e6eb1589d1478233c1c55d770b395a16eaa1a3
2023-11-15 11:40:49 -08:00
Jihoon Kang
eecb95f35b Merge "Add environment variable BUILD_FROM_SOURCE_STUB" into main am: 37d679df33 am: 404bf92c95 am: 9d4a61d46b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2831230

Change-Id: Ia9373171a57dbcabf8772e5a37b36d3d070eaafd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 18:30:43 +00:00
Jihoon Kang
7c1958f0f4 Add environment variable BUILD_FROM_SOURCE_STUB
On top of the soong build flag --build-from-source-stub, the user can
configure build to generate stubs from source Java files by setting the
environment variable BUILD_FROM_SOURCE_STUB=true.

Test: m nothing
Bug: 310279899
Change-Id: I0c5247558455f09b8fc208d988aab3b60bf0ff16
2023-11-15 00:34:43 +00:00
Makoto Onuki
b66bba3a3c Allow Ravenwood to cross variant boundaries
Bug: 310268946
Bug: 292141694
Test: atest RavenwoodMockitoTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:43b648195bcf62f62cae5547f73b247c278e1883)
Merged-In: Ia395d32bad57007ec477a6410dcc4201853c8790
Change-Id: Ia395d32bad57007ec477a6410dcc4201853c8790
2023-11-11 00:13:14 +00:00
Makoto Onuki
190b1aacc8 Allow Ravenwood to cross variant boundaries
Bug: 310268946
Bug: 292141694
Test: atest RavenwoodMockitoTest
Change-Id: Ia395d32bad57007ec477a6410dcc4201853c8790
2023-11-10 16:07:39 -08:00
Jihoon Kang
bb61391aba Merge "Revert^2 "Default from-text stub generation in build"" into main am: 8c4387e478 am: 1a062bab81 am: 32fbd4a02b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2807659

Change-Id: If91cc1a8e7d00e275392ccbec65d511459fda14e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-10 05:29:32 +00:00
Jihoon Kang
8c4387e478 Merge "Revert^2 "Default from-text stub generation in build"" into main 2023-11-10 04:10:24 +00:00
Colin Cross
12228f7581 Merge changes I4d0b27ba,Ic48e9cf2 into main am: 4ade19fe94 am: e7601cc83d am: ace644b7ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2823833

Change-Id: Icee80b522710d9d6a2568ba8592685dd4c945341
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-09 20:56:34 +00:00
Colin Cross
4ade19fe94 Merge changes I4d0b27ba,Ic48e9cf2 into main
* changes:
  Fix soong_ui file rlimits for go 1.21
  Fix TestReverseSlice for go 1.21
2023-11-09 18:47:40 +00:00
Colin Cross
f2fab8347d Fix TestReverseSlice for go 1.21
Go 1.21 does a better job using the same empty allocation for empty
slices, check for cap > 0 before requiring slices to have different
backing arrays.

Bug: 309895579
Test: TestReverseSlice
Change-Id: Ic48e9cf2c95ea0b810a11cdc4a794a70c02a0a61
2023-11-08 22:11:24 -08:00