Commit Graph

8320 Commits

Author SHA1 Message Date
Yu Liu
11d8b6e8d3 Merge "Remove containersInfo, complianceMetadataInfo and aconfigFilePaths from ModuleBase." into main 2024-08-29 17:07:05 +00:00
Priyanka Advani (xWF)
88a8daf8ca Merge "Revert^3 "Implement detecting container violations."" into main 2024-08-28 23:20:03 +00:00
Priyanka Advani (xWF)
33b3a638a5 Revert^3 "Implement detecting container violations."
2a88491afc

Change-Id: Iba4527f391a093703978fe01177b56fec4604b28
2024-08-28 23:10:29 +00:00
Jihoon Kang
c14be38f1a Merge changes Ia693c4a5,I8e5620d2 into main
* changes:
  Revert^2 "Implement detecting container violations."
  Define additional container violations
2024-08-28 21:35:16 +00:00
Jihoon Kang
2a88491afc Revert^2 "Implement detecting container violations."
This change introduces a method to detect violating inter-container
dependencies between modules. The method is run in
`ModuleBase.GenerateBuildActions`, after the container info provider is
set. Given that the provider of the direct dependencies would have been
set at this time, the method utilizes this information to determine
the violations, which are introduced in https://r.android.com/3141104.

Note that this enforcement does not turn all inter-container
dependencies as errors. Instead, it will only turn dependencies that
matches the pre-defined violations into errors. Even if the dependency
matches the violation, an error will not be thrown if the dependency
satisfies any of the exception functions (e.g. the dependent module is
stubs, or the two modules belong to the same apexes).

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: Ia693c4a53369c757a3e96656a769405c759b111c
2024-08-28 18:01:25 +00:00
Jihoon Kang
a1527e5e23 Define additional container violations
This violation was only triggered for specific TARGET_PRODUCT builds.

Test: build/soong/scripts/build-ndk-prebuilts.sh
Bug: 338660802
Change-Id: I8e5620d26eff83bdbda79da8bb8237056cb9dfbd
2024-08-28 17:59:52 +00:00
Yu Liu
b41b74fa2c Merge "Remove packagingSpecsDepSet from ModuleBase." into main 2024-08-28 17:12:07 +00:00
Satish Yalla
f2d6e5004f Merge "Revert "Implement detecting container violations."" into main 2024-08-28 05:48:21 +00:00
Satish Yalla
b2b1ef63e2 Revert "Implement detecting container violations."
This reverts commit bb678f82d6.

Reason for revert: Droidmonitor created revert due to b/362639013. Will be verifying through ABTD before submission.

Change-Id: I1dcb71672eeb44a17cf176d3731bcaf9aaf81edf
2024-08-28 05:10:31 +00:00
Treehugger Robot
26f071db92 Merge "Implement detecting container violations." into main 2024-08-28 04:39:12 +00:00
Treehugger Robot
dd5fa433f7 Merge "Add jacocoagent to allowlisted dependencies" into main 2024-08-28 04:12:28 +00:00
Jiyong Park
c7df8bf64b Merge "remove unused variable" into main 2024-08-28 03:35:59 +00:00
Treehugger Robot
9cbbafe300 Merge changes from topic "ctx_in_ideinfo" into main
* changes:
  Add ctx argument to IDEInfo()
  Add configurable property support to neverallow
2024-08-28 00:49:13 +00:00
Yu Liu
713f415cde Merge "Remove moduleInfoJSON from ModuleBase." into main 2024-08-28 00:32:50 +00:00
Inseob Kim
09557a0aa3 Merge "Include TARGET_ODM_PROP to odm/etc/build.prop" into main 2024-08-28 00:15:14 +00:00
Yu Liu
9a99313ac6 Remove containersInfo, complianceMetadataInfo and aconfigFilePaths from ModuleBase.
Bug: 358425833
Test: Manually verified all the generated ninja and mk files and CI.
Change-Id: I896659491e75bb2eacca93d2e4a83ead50e218d2
2024-08-28 00:02:48 +00:00
Treehugger Robot
78a3761bde Merge "Make IdeInfo into a provider" into main 2024-08-27 23:49:10 +00:00
Yu Liu
eb6d705d1f Remove packagingSpecsDepSet from ModuleBase.
The external code that depends on this field has been changed to use the
new interface, this field can be removed now.

Bug: 358425833
Test: Manually verified all the generated ninja and mk files and CI.
Change-Id: I12cb6e22c091bc90d3a3cbbf554e81b8dc27e264
2024-08-27 23:26:28 +00:00
Yu Liu
4297ad9046 Remove moduleInfoJSON from ModuleBase.
Bug: 358425833
Test: Manually verified all the generated ninja and mk files and CI.
Change-Id: I145272636b87b20e49c05e847336737cccc20f79
2024-08-27 23:23:26 +00:00
Cole Faust
b36d31d870 Add ctx argument to IDEInfo()
The IDEInfo() methods read properties. To make those properties
configurable, we need a context to evaluate them with.

Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: I26d4b7084439b3006e50b02277298f74a929e1aa
2024-08-27 16:04:28 -07:00
Cole Faust
5b35cb9aef Add configurable property support to neverallow
Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: I50b8bf3cc2e3520a12932b0a0e1041e079379590
2024-08-27 15:51:19 -07:00
Cole Faust
08c7f86575 Make IdeInfo into a provider
In order to keep the changes minimal, call the old IdeInfo method right
after GenerateAndroidBuildActions and then set the result of that
into a provider.

Test: Diff'd ninja files and saw no difference.
Change-Id: Ic706e7dbcb7c6e3d2a381ddae383eb87e105f385
2024-08-27 15:50:35 -07:00
Yu Liu
82a6d1464d Remove 6 install related fields from ModuleBase.
Bug: 358425833
Test: Manually verified all the generated ninja and mk files and CI.
Change-Id: If2c3417781953a1eef2b07a241424157fd73abff
2024-08-27 19:03:35 +00:00
Jihoon Kang
bb678f82d6 Implement detecting container violations.
This change introduces a method to detect violating inter-container
dependencies between modules. The method is run in
`ModuleBase.GenerateBuildActions`, after the container info provider is
set. Given that the provider of the direct dependencies would have been
set at this time, the method utilizes this information to determine
the violations, which are introduced in https://r.android.com/3141104.

Note that this enforcement does not turn all inter-container
dependencies as errors. Instead, it will only turn dependencies that
matches the pre-defined violations into errors. Even if the dependency
matches the violation, an error will not be thrown if the dependency
satisfies any of the exception functions (e.g. the dependent module is
stubs, or the two modules belong to the same apexes).

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I36e9cd956c5a076a53635be0c6ff27f77725516e
2024-08-27 17:30:42 +00:00
Jihoon Kang
601939d0a7 Add jacocoagent to allowlisted dependencies
jacocoagent is implicitly added as a dependency in coverage builds, and
is not installed on the device.

Test: m nothing
Bug: 338660802
Change-Id: Icf14ce5f9b0819a3c5fbe74cf1674719859ad5c6
2024-08-27 17:27:52 +00:00
Yu Liu
4b98396c64 Merge "Remove licenseMetadataFile and installFiles from ModuleBase." into main 2024-08-27 15:54:00 +00:00
Jiyong Park
e41a42d8d6 remove unused variable
Bug: N/A
Test: N/A

Change-Id: I334cd495599bb1aea022a215fd48e573060069de
2024-08-27 18:31:57 +09:00
Pindar Yang
1282d27291 Merge "Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong"" into main 2024-08-27 03:25:23 +00:00
Pindar Yang
1558cc68ec Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong"
Revert submission 3195743-compatibility_matrix

Reason for revert: Build Break, Bug: 361227456

Reverted changes: /q/submissionid:3195743-compatibility_matrix

Change-Id: Ib89cdc64eb816ca0df872473b1e9a9dfdb08ceee
2024-08-27 03:22:41 +00:00
Yu Liu
ec81054548 Remove licenseMetadataFile and installFiles from ModuleBase.
Bug: 358425833
Test: Manually verified all the generated ninja and mk files and CI.
Change-Id: I447ec74b7f9c3b8c686ed41511e2051f40ac88f8
2024-08-27 00:16:22 +00:00
Jihoon Kang
17a362a506 Add the list of currently existing violations
This change adds the list of currently existing inter-container
dependency violations. The list is extracted from the container
enforcement mutator, which is implemented in the child change
https://r.android.com/3155659, but is splitted into a separate change
for the ease in review and resolving merge conflicts.

Test: m nothing
Bug: 338660802
Change-Id: If0e352092dcd4573daa9a5675f679c38bede18f8
2024-08-26 23:22:01 +00:00
Treehugger Robot
803ca1cf0d Merge "Sandbox the OUT_DIR environment variable" into main 2024-08-26 20:49:59 +00:00
Yu Liu
ad64c5f370 Merge "Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap from ModuleBase." into main 2024-08-26 19:00:12 +00:00
Cole Faust
1ead86c1a5 Sandbox the OUT_DIR environment variable
Currently, OUT_DIR is inherited from the parent process, leading to
scripts being able to find the output directory when the enviornment
variable is set to an absolute path. When sandboxing a command,
also rewrite the OUT_DIR environment variable to the sandboxed one,
so that scripts can't find the real out dir.

Bug: 307824623
Test: Presubmits
Change-Id: I325071121a60bddc4105df680fbdfe3d11dc94e2
2024-08-26 11:12:10 -07:00
Yu Liu
bad1eef6d8 Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap
from ModuleBase.

The old packagingSpecsDepSet field is kept temporarily to bypass an
auto-merge issue, and will be removed in next change.

Bug: 358425833
Test: CI
Change-Id: I28b4933459c33224f756cc306cabc8088f9be862
2024-08-26 17:45:38 +00:00
Inseob Kim
9a22c7e61b Include TARGET_ODM_PROP to odm/etc/build.prop
It's missing in Soong's build_prop module.

Bug: 322090587
Bug: 361623560
Test: set TARGET_ODM_PROP and see odm/etc/build.prop
Change-Id: I447a64998f6ae0ba80201ab4ab6c0fd0ef22e3e5
2024-08-26 15:58:09 +09:00
Treehugger Robot
bc75594499 Merge "Make the defaults property non-configurable" into main 2024-08-26 00:03:30 +00:00
Cole Faust
52d37c3249 Make the defaults property non-configurable
In order to support changing the global configuration per-module,
we can't make decisions on configuration until the configuration is
decided. The defaults mutator is one of the earliest mutators, and
it would be helpful to run it before deciding the configuration.

Bug: 361816274
Test: Presubmits
Change-Id: Iee9c603d7e2601919d636345dfdedae47448db38
2024-08-23 16:20:58 -07:00
Qing Shen
713c54289c Revert "Revert "Add a coverage suffix to avoid Ninja file regene..."
Revert submission 3235973-revert-3207217-emma-flip-time-saver-BYWASVIMTD

Reason for revert: Rolling forward with a fix

Adding a coverage suffix for product_config.go too:

FAILED: ninja: 'out/soong/soong.sdv_core_cf.extra.variables', needed by 'out/soong/.intermediates/build/soong/product_config/product_config.json', missing and no known rule to make it
03:42:23 ninja failed with: exit status 1

Reverted changes: /q/submissionid:3235973-revert-3207217-emma-flip-time-saver-BYWASVIMTD

Change-Id: I74d0e3fda09b1367f3dbb939d4f47c4d09b3d51f
2024-08-23 21:41:52 +00:00
Treehugger Robot
65c530c17e Merge "Remove suffix based stub matching logic" into main 2024-08-23 03:42:12 +00:00
Jihoon Kang
fa3f0782f7 Remove suffix based stub matching logic
This change prevents non-stub modules with stub suffix from being
determined as the stub module, and instead makes the check more robust
by determining the condition based on the user-hidden
`Stub_contributing_api` property, which is only set for the stub
submodules generated by `java_sdk_library`.

Test: m nothing --no-skip-soong-tests
Bug: 361179822
Change-Id: I28a599c5b4fe1e8460e60580c0535aaf19e39ba3
2024-08-22 22:05:03 +00:00
Yu Liu
75c242497f Merge "Remove outputFiles from ModuleBase." into main 2024-08-22 06:48:09 +00:00
Treehugger Robot
e0e4a24dcc Merge "Add "TARGET_BOARD_PLATFORM" into ProductVariables" into main 2024-08-22 05:43:38 +00:00
Herbert Xue
0fc8abe740 Add "TARGET_BOARD_PLATFORM" into ProductVariables
Bug: 360872208
Bug: 348120216
Test: aosp_cf_x86_64_phone-trunk_staging-eng && m hosttar
Change-Id: I79917b10245b982c466afde0570d9da0395232b3
2024-08-22 00:54:10 +00:00
Kiyoung Kim
17b4117cb8 Merge changes from topic "product_variable_vintf_fragments" into main
* changes:
  Variables uses vintf_fragment_modules
  Append vintf_fragment_modules as required for AndroidMk
2024-08-22 00:41:29 +00:00
Yu Liu
876b7ce263 Remove outputFiles from ModuleBase.
Bug: 358425833
Test: CI
Change-Id: I6c398fbdbc38b99fa62f8670baa44ffd51b5e6d3
2024-08-21 19:11:43 +00:00
Yu Liu
51c2231eab Access output files thru providers in Soong tests.
The outputFiles field on ModuleBase will be removed next.

Bug: 358425833
Test: CI
Change-Id: I6d665ac13134d9278e5908f64c454366bc6bca5e
2024-08-21 00:03:50 +00:00
Yu Liu
ddc2e1ac09 Remove build target related fields from ModuleBase.
Bug: 358425833
Test: CI
Change-Id: I2af6d0d2fd3be70594860a0e6d86179d5850eb07
2024-08-20 21:31:22 +00:00
Yu Liu
460c0fa8b4 Use namespace path instead of id in phonies.
Otherwise the phones' names depend on the sorting order of all the
namespaces, which add unnecessary dependencies.

Bug: 358425833
Test: CI
Change-Id: Ic88a329ff320e508ece8e3b20c7497a28a619276
2024-08-20 19:34:49 +00:00
Yu Liu
ee5b92fd6c Merge "Add phonies as provider instead of updaing a global map." into main 2024-08-20 15:56:33 +00:00