8781 Commits

Author SHA1 Message Date
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
dd898d855b Merge "Remove packagingSpecsDepSet from ModuleBase." into main am: b41b74fa2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3246174

Change-Id: Ib5b209deff46e89873e2e053daa8b1fbe791d929
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 17:14:25 +00:00
Yu Liu
b41b74fa2c Merge "Remove packagingSpecsDepSet from ModuleBase." into main 2024-08-28 17:12:07 +00:00
Satish Yalla
b2407feae1 Merge "Revert "Implement detecting container violations."" into main am: f2d6e5004f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3244001

Change-Id: Ibfcf7b1965a52402917a32a203bf55cb82d1626b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 05:52:08 +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
30f3795688 Merge "Implement detecting container violations." into main am: 26f071db92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3155659

Change-Id: Id60c6920d6c964193b53c8b5f7026472c5fcacb0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 04:43:21 +00:00
Treehugger Robot
26f071db92 Merge "Implement detecting container violations." into main 2024-08-28 04:39:12 +00:00
Treehugger Robot
9cfb2a1f9e Merge "Add jacocoagent to allowlisted dependencies" into main am: dd5fa433f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3241288

Change-Id: I86743dbb317ed37219a7ec8c19db90cf05e716d9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 04:16:36 +00:00
Treehugger Robot
dd5fa433f7 Merge "Add jacocoagent to allowlisted dependencies" into main 2024-08-28 04:12:28 +00:00
Jiyong Park
eb9dc6e76d Merge "remove unused variable" into main am: c7df8bf64b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3241515

Change-Id: Ie72d28a8587fd5fd362e656ff79b2f04d74e16ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 03:40:41 +00:00
Jiyong Park
c7df8bf64b Merge "remove unused variable" into main 2024-08-28 03:35:59 +00:00
Treehugger Robot
e1028aa539 Merge changes from topic "ctx_in_ideinfo" into main am: 9cbbafe300
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3246818

Change-Id: Ia2b721e9967c0772acd7dd261ec18315f6c26b5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 00:53:10 +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
4e5460e156 Merge "Remove moduleInfoJSON from ModuleBase." into main am: 713f415cde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3243313

Change-Id: I8f89d3e41948e4b26b098c9fdb9523c5f214eb3e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 00:37:24 +00:00
Yu Liu
713f415cde Merge "Remove moduleInfoJSON from ModuleBase." into main 2024-08-28 00:32:50 +00:00
Inseob Kim
bb6ebb056b Merge "Include TARGET_ODM_PROP to odm/etc/build.prop" into main am: 09557a0aa3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3237749

Change-Id: Ic2eb7fac04e50bb4dfd98cd2757e3d15a5e83090
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 00:20:56 +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
cc02a664cf Merge "Make IdeInfo into a provider" into main am: 78a3761bde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3245754

Change-Id: If90b650d7e0832de74a858c541277f9658f477c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 23:55:40 +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
Yu Liu
457cf82ecc Merge "Remove 6 install related fields from ModuleBase." into main am: 3e4458bf52
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3245217

Change-Id: Iad60c890b14ced77921ca70b42fb71a102a70389
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 23:21:34 +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
f8b8dcfbea Merge "Remove licenseMetadataFile and installFiles from ModuleBase." into main am: 4b98396c64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3242292

Change-Id: I1b4551603b70e2faad9dd886b638cc6eb775f03b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 15:57:40 +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
33d6f763e2 Merge "Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong"" into main am: 1282d27291
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3235655

Change-Id: Idac5d2bbdecd6af39d5983b91bd60a7134e81c9e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 03:33:33 +00: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
Jihoon Kang
3b7db8f619 Add the list of currently existing violations am: 17a362a506
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3166179

Change-Id: I5656ecab3496a462df5f0ee204e4f7d969cd854e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-27 01:04:23 +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
3c6d535b61 Merge "Sandbox the OUT_DIR environment variable" into main am: 803ca1cf0d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3238458

Change-Id: Ib28f617a8623d755df86fe5012843af84990deef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-26 20:56:47 +00:00
Treehugger Robot
803ca1cf0d Merge "Sandbox the OUT_DIR environment variable" into main 2024-08-26 20:49:59 +00:00
Yu Liu
afb4e9440d Merge "Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap from ModuleBase." into main am: ad64c5f370
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3236345

Change-Id: I97f2c8d3cbf19c67896fd34ad28ba82276ec1989
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-26 19:03:28 +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
e56547c667 Merge "Make the defaults property non-configurable" into main am: bc75594499
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3238421

Change-Id: I23918fdd5bd6a3a711de84fd71f4a4636e864120
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-26 00:11:12 +00:00
Treehugger Robot
bc75594499 Merge "Make the defaults property non-configurable" into main 2024-08-26 00:03:30 +00:00
Qing Shen
3c5afb956e Merge "Revert "Revert "Add a coverage suffix to avoid Ninja file regene..."" into main am: ffb985e9bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3238687

Change-Id: I49fbf7ac4214e4f811aad2510f3a57328d8c6c17
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-23 23:25:13 +00:00