Commit graph

8017 commits

Author SHA1 Message Date
Jihoon Kang
4f04df9f50 Disable stub validation when WITHOUT_CHECK_API=true
Even when building stubs from source, the rules for the
java_api_library modules are generated although they are not
executed. This leads to NPE, as setting `WITHOUT_CHECK_API=true`
prevents `checkCurrentApiTimestamp`, which the java_api_library modules
depend on, from being generated.

To prevent the NPE, this change prevents the `checkCurrentApiTimestamp`
from being registered as the dependency of the java_api_library modules
when `WITHOUT_CHECK_API=true` is set.

Test: BUILD_FROM_SOURCE_STUB=true WITHOUT_CHECK_API=true m nothing
Bug: 320601440
Change-Id: I4f19e30d9cd74bdc20dde0d14884fb03ff223ccb
2024-01-30 02:40:20 +00:00
Spandan Das
3cf0463a47 Support mechanism to select a specific version of module sdk prebuilt
This CL is the java_(test_)_import equivalent of aosp/2928483.

With trunk stable, we will have
multiple prebuilts of the prebuilt java .jars in
prebuilts/module_sdk/art/<v>/test-exports/, and this CL introduces a
mechanism to use apex_contributions to select a specific versioned
prebuilt when building.

Implementation details: Create a new source_module_name property to
identify the root module. rdeps referring to the root module will get
redirected if necessary. This property also
becomes the stem, if `stem` is not set explicitly.

Bug: 322175508

Test: Added a unit test
Change-Id: I2dff38acdf2002355586dbb2be8c1f98af4741f7
2024-01-30 01:59:51 +00:00
Treehugger Robot
59739666e6 Merge "Prevent disabling checks via flags property" into main 2024-01-30 00:14:17 +00:00
Cole Faust
5d0aaf42db Prevent disabling checks via flags property
strict_updatability_linting currently only checks that updatability
checks aren't disabled via disabled_checks / warning_checks, you could
get around it using the `flags` property. Only allow controlling checks
via the *_checks properties.

Bug: 322802379
Test: m nothing --no-skip-soong-tests
Change-Id: Ia311622e1409f9cc201ab55f8749f2d13fccf551
2024-01-29 14:48:23 -08:00
Treehugger Robot
5a48d4fe3d Merge "Fix the args used to dexpreopt system server jars in prebuilt apexes" into main 2024-01-26 21:55:59 +00:00
Treehugger Robot
99ed03f4fe Merge "Add build flag to enable ResourceProcessorBusyBox by default" into main 2024-01-26 19:07:25 +00:00
Spandan Das
e21a8d4dc6 Fix the args used to dexpreopt system server jars in prebuilt apexes
For prebuilts, java.dexpreopt gets called twice
1. in the context of the top-level prebuilt apex
2. in the context of the java_library shim

Only the artifacts of (1) get installed. The artifacts generated by 2)
are unused. However the args used to generate the artifacts of (1) are
incorrect. It uses moduleName(ctx) to do special-handling of apex system
server jars. This special-handling does not happen in (1), so although
dexpreopt artficats get generated, they get generated with the wrong
args.

To fix this, add an additional parameter in java.dexpreopt to pass the
libraryName explicitly.

Details
- Delete moduleName function. This was used to determine the java
  library name, which is no longer safe
- Add a libraryName parameter to java.dexpreopt
- Most module types will use j.Name() as libraryName
- prebuilt_apex and apex_set will iterate over its `contents` and use
  each element as libraryName when invoking java.dexpreopt

With the correct args passed from (1), we can drop j.dexpreopt from (2)
completely. Dropping (2) also breaks profile guided dexpreopt tests.
These currently operate on (2). They will be moved to (1) in the next CL
of this stack.

Test: presubmits
Test: lunch cf_x86_64_auto-trunk_staging-userdebug && m nothing (this
was a postsubmit failure with aosp/2923733)
Test: art_standalone_dexpreopt_tests on next https://android-build.corp.google.com/builds/abtd/run/L86000030001579256
Test: art-gtest on git_master-art-host https://android-build.corp.google.com/builds/abtd/run/L07800030001550262

Bug: 308790457
Bug: 322255144

Change-Id: I8eb604c82f1fa5289d3cd1a20084d56e4d7485e3
2024-01-26 18:06:41 +00:00
Colin Cross
8f1b033cf7 Add build flag to enable ResourceProcessorBusyBox by default
Setting the RELEASE_USE_RESOURCE_PROCESSOR_BY_DEFAULT build flag will
change the default for use_resource_processor from false to true.

Bug: 294256649
Test: builds
Change-Id: If643bf8db9e2e039200f63f4aac226ed5b44d9e0
2024-01-26 09:09:42 -08:00
Colin Cross
e28cdf362e Merge "Convert coverageMutator to a TransitionMutator" into main 2024-01-25 23:19:29 +00:00
Cole Faust
1627236844 Merge "Make hiddenAPIFlagFileCategory an int" into main 2024-01-25 22:42:39 +00:00
Asmita Poddar
1f4475cee1 Merge "Revert "Ensure sscp jars get copied to $OUT/soong/system_server_dexjars"" into main 2024-01-25 10:08:11 +00:00
Spandan Das
b2fd4ff43f Revert "Ensure sscp jars get copied to $OUT/soong/system_server_dexjars"
This reverts commit 0b7089f134.

Reason for revert: Breaks auto builds https://groups.google.com/a/google.com/g/android-build-police/c/DfXeyxkyfYk/m/4SvZa-jkAAAJ

Change-Id: Ia6ebdf64d03284d2318978c35cb87fd4f0b79531
2024-01-25 04:25:38 +00:00
Spandan Das
9d4ad66a93 Merge "Ensure sscp jars get copied to $OUT/soong/system_server_dexjars" into main 2024-01-25 01:27:18 +00:00
Jihoon Kang
dbc88dc4d0 Merge "Prepare to generate "runtime" stubs in droidstubs" into main 2024-01-24 21:30:38 +00:00
Colin Cross
f5f4ad3db6 Convert coverageMutator to a TransitionMutator
Convert coverageMutator to a TransitionMutator as a step towards
variants-on-demand.

Bug: 319288033
Test: coverage_test.go
Test: treehugger coverage builds
Change-Id: Ic50c0040dea8b42c36b5d784221daa00b7b0d379
2024-01-24 10:17:10 -08:00
Jihoon Kang
5373efc1c7 Merge "Error when WITHOUT_CHECK_API=true in from-text stub build" into main 2024-01-24 18:06:53 +00:00
Spandan Das
0b7089f134 Ensure sscp jars get copied to $OUT/soong/system_server_dexjars
(This was missed in aosp/2876756, which copied only the bcp jars)

This hardcoded location is used by dex2oat to compile the dexpreopt
artifacts. The copy rules are currently generated by java_(sdk)_library
for source builds, and their prebuilt counterparts in prebuilt builds.

After this change, the copy rule will be bifurcated between source and
prebuilt builds
1. For source builds, it will come from java_(sdk)_library
2. For prebuilt builds, it will come from the top-level prebuilt apex.
   Since there can be multiple prebuilt apexes in trunk stable,
   HideFromMake will be used to determine which deapexed jar to copy.

The bifurfaction is expected to be temporary. It is needed for now since
the `apex_contributions` which will be used for source vs prebuilt
selection have not been populated completely.

Test: Added a unit test
Test: Presubmits
Test: git_master-art-host:
art-gtest (https://android-build.corp.google.com/builds/abtd/run/L40800030001459791)
Test: git_main:art_standalone_tests
(https://android-build.corp.google.com/builds/abtd/run/L09000030001463855)

Bug: 308790457

Change-Id: I3105d3b3a7e5c41cb601d07806f4ea483a61b50a
2024-01-24 05:14:40 +00:00
Cole Faust
22e8abcaa6 Make hiddenAPIFlagFileCategory an int
hiddenAPIFlagFileCategory used to contain function pointers, and is
used in a provider. Providers must be serializable for incremental
soong support, so the function pointers must be removed.

Refactor hiddenAPIFlagFileCategory into a simple int.

Bug: 322069292
Test: m nothing --no-skip-soong-tests
Change-Id: I2bd50fa1b59979f30869b405314cbef16ee345f1
2024-01-23 18:01:47 -08:00
Jihoon Kang
91bf3dd4ac Error when WITHOUT_CHECK_API=true in from-text stub build
Given that WITHOUT_CHECK_API=true is incompatible with from-text stub
build, this change makes the module raise an error when the two
conflicting configurations are set.

This change also modifies the checkapi error message, that
DISABLE_STUB_VALIDATION does not bypass checkapi.

Test: m nothing --no-skip-soong-tests && WITHOUT_CHECK_API=true m nothing
Bug: 322060779
Change-Id: I597309baa8fcfbefa05863c7b392bfb8b6774cea
2024-01-24 01:21:47 +00:00
Jihoon Kang
fbe572b064 Merge "Rename apiScope.stubsTag" into main 2024-01-23 01:43:55 +00:00
Jihoon Kang
ee11328709 Prepare to generate "runtime" stubs in droidstubs
In order to prepare generating "runtime" stubs in droidstubs, this
change performs some cleanups, which are:

- Modify droidstubs providers methods to take a StubsType enum as an
  input, in order to remove exportable-specific providers. The methods
  are also modifed to return an error when the artifact is not provided
  for the input StubsType.

- Wrap droidstubs artifact to a struct. This removes artifacts common to
  all stubs types from being written out as a individual module property
  (e.g. exportableAnnotationsZip -> exportableArtifacts.annotationsZip)

Test: m nothing --no-skip-soong-tests
Bug: 319162970
Change-Id: I6d6c57c5417ca71eab5ddda7981b71fd84fa6ee1
2024-01-23 00:29:25 +00:00
Jihoon Kang
b743155a26 Rename apiScope.stubsTag
The different roles of stubs (e.g. dependency to java modules,
hiddenapi, dist to sdk snapshot) are now split to different set of stubs
(everything, exportable and eventually runtime), while a single set of
stubs are responsible for all roles for the prebuilt stubs. Thus, the
stubs from source are depending different stubs tag (e.g.
everythingStubsTag, exportableStubsTag), while the prebuilt stubs
utilize stubsTag. Given that this tag is only used for the prebuilt
stubs, it can be renamed to `stubsTag`.

Test: m nothing --no-skip-soong-tests
Bug: 319162970
Change-Id: Iacdf434fab6a403482fd2f1de24e6f260ad80756
2024-01-22 19:40:08 +00:00
Colin Cross
1b1b9a937b Merge changes from topic "soong-tests-presubmit" into main
* changes:
  Add script to run Soong tests with go tools
  Disable TestVariantSingletonModule when go test -short is used
  Fix data race in propagateRROEnforcementMutator
  Fix data race in finder_test.go
  Fix data race in dex_bootjars
  Fix race CommonGlobalCflags when running tests in parallel.
  Fix data race in snapshot singletons when running parallel tests
2024-01-18 23:58:45 +00:00
Colin Cross
7e6a9012c0 Fix data race in propagateRROEnforcementMutator
propagateRROEnforcementMutator walks dependencies of each module and
modifies them via SetRROEnforcedForDependent.  That is unsafe in a
parallel mutator, as the same dependency could be being visited by
two parent modules at the same time.  Don't mark it as a parallel
mutator.

Test: go test -race ./...
Change-Id: I9870aaa7d165bf72b751e3ceff5a2a3eb4d74ec4
2024-01-18 13:23:06 -08:00
Treehugger Robot
193bb8c317 Merge "Add better error handling to bootDexJar function" into main 2024-01-18 20:38:13 +00:00
Colin Cross
84ed511ceb Fix data race in dex_bootjars
Move fields in bootImageConfig that are written during
GenerateAndroidBuildActions into a provider to avoid a data race.

Test: go test -race ./...
Change-Id: I0d6783530843889b96f32d748bda7824493d2e32
2024-01-17 16:10:37 -08:00
Spandan Das
3a3920129d Add better error handling to bootDexJar function
aosp/2876754 missed adding error handling to one of the places which
consumes the dex jar deapexed from prebuilt apexes. This CL ensures that
when we have multiple prebuilt apexes _without_ flagging, the hiddenapi
processing code emits a more descriptive error "Multiple deapxers..."
rather than a cryptic error "<module> does not provide a dex jar"

Test: m nothing --no-skip-soong-tests

Change-Id: I80849fa7cca17d724ac53c94bb353b169175ee28
2024-01-17 20:59:43 +00:00
Treehugger Robot
c0412f5d31 Merge "Remove HideFlaggedApi() related logic and the related product variables" into main 2024-01-17 00:20:54 +00:00
Jihoon Kang
78b6b30aec Remove HideFlaggedApi() related logic and the related product variables
With the recent build changes to support generating mainlin module sdk
with flagged apis, the build no longer depends on the values of these
product variables in exposing the flagged apis, but these are determined
by the aconfig flags. Given that these variables are no longer used,
this change removes these variables and the variables dependent code.

Test: m nothing --no-skip-soong-tests
Bug: 320515715
Change-Id: I6af94da73cc7fc7ffce670928aad81cec5d383b4
2024-01-16 20:20:27 +00:00
Treehugger Robot
535f739153 Merge "Disable prebuilt apps without an apk later" into main 2024-01-16 18:25:30 +00:00
Treehugger Robot
ce8d254149 Merge "Implicitly bump up Java target to 1.8" into main 2024-01-16 18:09:41 +00:00
Sorin Basca
d567a514ee Implicitly bump up Java target to 1.8
Bug: 320294595
Test: m
Change-Id: I693e564c67d17254d68f3a9c16664c1da93b9488
2024-01-15 16:38:46 +00:00
David Srbecky
cf33b025d9 Merge "Revert^7 "Enable dex container (DEX v41) for the whole system"" into main 2024-01-15 11:10:45 +00:00
Yanning Jia
43668c6f13 Revert^7 "Enable dex container (DEX v41) for the whole system"
This reverts commit 7022550d0e.

Reason for revert: Breaks app's DRM

Bug: 317744117
Change-Id: I539e6ec037db1c297fe7cf85d294bebe963ab214
2024-01-15 11:09:32 +00:00
Cole Faust
97494b197e Disable prebuilt apps without an apk later
Currently, android_app_import modules get disabled during their load
hook if they don't have a set `apk` property. This causes them to be
disabled before soong config variables can be applied, which would've
set the apk property.

Move the disabling into a DefaultableHook, which will run after the
soong config variables.

Bug: 319897584
Test: m nothing --no-skip-soong-tests
Change-Id: Ia0f6a39c35b3b11249bfa74ad532858189be24b1
2024-01-12 17:02:58 -08:00
Jihoon Kang
7e9343b889 Merge changes from topic "hiddenapi_exportable" into main
* changes:
  Copy exportable artifacts to module sdk snapshot
  Enable hiddenapi check for exportable stubs
  Add defaults support for bootclasspath_fragment module type
2024-01-12 23:50:37 +00:00
Jihoon Kang
f55a5f7b37 Copy exportable artifacts to module sdk snapshot
This change modifies the copy rules of the sdk_library when generating
the module sdk snapshots so that the exportable artifacts (annotations
zip, api file, removed api file, srcjar file) are copied instead of the
everything artifacts.

In order to satisfy the prebuilts compatibility, this feature is flag
guarded by the build flag "RELEASE_HIDDEN_API_EXPORTABLE_STUBS"

Test: m --no-skip-soong-tests
Bug: 315027929
Change-Id: I8bf5bb1f196aa9b5db78ba4677caa5f4337e3021
2024-01-12 01:50:19 +00:00
Jihoon Kang
bd093457e2 Enable hiddenapi check for exportable stubs
This change modifies the dependencies of the hiddenapi to always depend
on the exportable stubs, instead of the currently utilized everything
stubs.

To support this, the full api surface exportable stubs are defined in a
separate change at the `frameworks/base` project. Note that the full api
surface exportable stubs are only used for the hiddenapi purpose, and
`sdk_version` continues to utilize the currently existing everything
stubs.

Currently, this feature is hidden behind the build flag
"RELEASE_HIDDEN_API_EXPORTABLE_STUBS". This feature will be fully
enabled once metalava fully supports handling of the flagged apis.

Test: ENABLE_HIDDENAPI_FLAGS=true m
Bug: 317426356
Change-Id: I109b7cd27b20ceffcdf1766ab8106b0c276be2b3
2024-01-12 01:03:10 +00:00
Jihoon Kang
9272dccb1e Add defaults support for bootclasspath_fragment module type
This change transforms the bootclsspath_fragment module into a
defaultable module, in order to modify the "art-bootclasspath-fragment"
module definition based on the build flag in
https://r.android.com/2897389

Test: m nothing
Bug: 315027929
Change-Id: I01ba7b15e4fcdea9bd31c369110a3c9ee38bc9f6
2024-01-12 01:02:45 +00:00
LaMont Jones
afe7baf47d Propagate aconfig providers for more modules.
Bug: 308625757
Test: manual
Change-Id: Iaf6d45a4259f1c6c34476c34c431344283ae2830
2024-01-10 14:03:30 +00:00
LaMont Jones
acae2d7656 move SetAconfigFileMkEntries to android
This will need to be called by some modules handled in android.

Bug: 308625757
Test: manual
Change-Id: Ic56e8ef3a453c59866aab6d39a21108cf8536b56
2024-01-10 14:03:29 +00:00
Dennis Shen
2127887e32 Merge "Enforce one aconfig_declaration per aconfig package" into main 2024-01-10 12:46:06 +00:00
Treehugger Robot
d06bdb0310 Merge "Update released flagged apis rule" into main 2024-01-10 02:00:54 +00:00
Dennis Shen
4e7773d81e Enforce one aconfig_declaration per aconfig package
Bug: b/319121098
Change-Id: Ibe3f1587ed7754f00f464cf385ce51ee9a142412
2024-01-10 01:53:49 +00:00
Jihoon Kang
125b0a7639 Update released flagged apis rule
The aconfig command has been recently updated to fully specify the
output format instead of passing the keyword format (e.g., bool). This
change reflects the change in the aconfig tool.

Test: m art.module.public.api && inspect the generate released-flagged-apis-exportable.txt output
Change-Id: I620b7f34c346288ca87342448f50a0e90813304f
2024-01-10 00:59:12 +00:00
Treehugger Robot
ec3887ad2f Merge "Replace panic with ModuleErrorf" into main 2024-01-10 00:16:52 +00:00
Spandan Das
59a4a2b8d2 Replace panic with ModuleErrorf
This is a followup cleanup for aosp/2876754 and replaces panic with
ctx.ModuleErrorf. The latter creates a more expressive build error.

Implementation details
- export moduleErrorf interface from build/soong/android. This minimal
  interface will be used as a parameter for `DexJarBuildPath`
- Add ModuleErrorf to the function signature of DexJarBuildPath. This
  parameter only gets used for Import and SdkLibraryImport structs.
  These two can have duplicate deapexer definitions, and ModuleErrorf
  will be used to report that error
- Create a minimal implementation of `ModuleErrorf` in tests of java and
  apex

Test: m nothing --no-skip-soong-tests
Change-Id: I0febec651f40c3f04deb957e64133c94b80fbd78
2024-01-09 22:53:52 +00:00
Jihoon Kang
150d87fce0 Fix the static rule for generating the revert annotations
While the static rule depends on the keep-flagged-apis binary, the
command deps was mistakenly not specified. This change fixes the rule.

Test: m
Change-Id: I4875ac516e0e03389eb6a09d720c94f28710fbc9
2024-01-09 19:23:36 +00:00
Jihoon Kang
539b46b6bd Merge "Generate "exportable" stubs library in java_sdk_library" into main 2024-01-09 06:02:12 +00:00
Jihoon Kang
0d2afbbfc0 Merge "Enable droidstubs to export "exportable" artifacts" into main 2024-01-09 06:01:51 +00:00
Jihoon Kang
9d800859f4 Merge "Generate "exportable" stubs in droidstubs" into main 2024-01-09 06:01:34 +00:00
Jihoon Kang
0f5162161d Merge "Add aconfig_declarations property to droidstubs and java_sdk_library" into main 2024-01-08 23:52:27 +00:00
Jihoon Kang
fa4a90d434 Generate "exportable" stubs library in java_sdk_library
Given that now the droidstubs module generates the "exportable" stubs,
this change modifies java_sdk_library to generate the java_library
modules that compiles the "exportable" stubs per api scope.
The detailed naming scheme of the generated modules are available in the
bug linked in the footer.

Similar to the from-text java_api_library vs from-source java_library
static lib selection for the "everything" stubs, the "exportable" stubs
module can also toggle between the stubs java_api_library and the
java_library module. However, given that the "exportable" stubs
generation has not been implemented for from-text stubs, the module
always default to depend on the from-source "exportable" stubs compiling
java_library module.

Test: go test ./java
Bug: 315495926
Change-Id: I5798312c1338c55625b2030da728b056385171a4
2024-01-08 09:20:48 +00:00
Jihoon Kang
78f8914fed Enable droidstubs to export "exportable" artifacts
This change adds support for the droidstubs module to export the
"exportable" artifacts via OutputFiles(tag string) method, while
supporting the current behavior of exporting "everything" artifacts via
a tag. With the support, a rdep module can depend on the "exportable"
(and "runtime" in the long run) artifacts by prepending the stubs type
in the tag. For instance, given that the currently supported tag
{.annotations.zip} exports the everything annotations.zip file,
{.exportable.annotations.zip} tag will export the exportable
annotations.zip file. For an unsupported combination (e.g. all runtime
stubs related artifacts as of now), an error will be thrown.

Test: m nothing --no-skip-soong-tests
Bug: 315490657
Change-Id: Idcefd9cdc02d323306fb8d7be2a2b34f67501f56
2024-01-08 09:20:13 +00:00
Jihoon Kang
3c89f04777 Generate "exportable" stubs in droidstubs
This change generates rules for "exportable" stubs in the droidstubs
module.

Given that there are a lot of overlap between the currently existing
"everything" stubs rule and the newly introducing "exportable" stubs
rule, the currently existing metalava rule commands are modularized to
be utilized in the "exportable" stubs rule commands.

The currently existing build actions are modularized in the followings:
- commonMetalavaStubCmd(...): metalava commands that are required for
  generation of both "everything", "exportable", and potentially
  "runtime" stubs
- everythingOptionalCmd(...): metalava commands that are dependent on
  "everything" stubs and not dependent on flagged apis annotations, such
  as api lint, released api check

Based on this modularization, the "everything" stubs are now generated
in everythingStubCmd(...), which calls commonMetalavaStubCmd(...) and
everythingOptionalCmd(...).
Similarly, the "exportable" stubs are generated in
optionalStubCmd(stubsType=Exportable, ...), which calls
commonMetalavaStubCmd(...) and appends additional flags. Runtime stubs
can be generated similarly in the future with
optionalStubCmd(stubsType=Runtime, ...).

"everything"-related artifacts will now  be created in
`everything/` subdirectory, and "exportable"-related artifacts will be
created in `exportable/` subdirectory. For example, the outdir of a
droidstubs module "foo" would look like below:
```
foo
  |-- everything
  | |-- foo_api.txt
  | |-- foo-stubs.srcjar
  |
  |-- exportable
    |-- foo_api.txt
    |-- foo-stubs.srcjar
```

The module generates the build rules for the "exportable" stubs
regardless of whether the module defines the `aconfig_declarations`
property or not. All APIs marked with `@FlaggedApis` annotations are
stripped out for the "exportable" stubs when the `aconfig_declarations`
property is not defined. On the other hand, only the `@FlaggedApis` that
are specified in the aconfig_declarations module and are enabled will be
included (and all others are stripped) when the `aconfig_declarations`
propety is defined.

Test: go test ./java && BUILD_FROM_SOURCE_STUBS=true m
Bug: 315490657
Change-Id: I300273cd2a62fa978b046c0268e3a67c35e22b08
2024-01-08 07:56:07 +00:00
Jihoon Kang
6592e87dbf Add aconfig_declarations property to droidstubs and java_sdk_library
In consideration of the incremental build performance, this change let
droidstubs and java_sdk_library (which generates droidstubs per api
scope) modules to specify `aconfig_declaration` modules where the
dependent flags are defined in via the "aconfig_declarations" property,
opposed to passing uniform "all_aconfig_declaration"-generated flag
arguments to metalava.

When "aconfig_declarations" property is defined for java_sdk_library
modules, the property is passed to the generated droidstubs modules.

When "aconfig_declarations" property is defined for droidstubs modules,
the all aconfig_declaration modules listed in the property are listed as
deps, all cache protobuf files are gathered and metalava-consumable
flags are generated in "revert-annotations.txt".

Although this change introduces scalable implementation to easily
support generation of the "runtime" stubs corresponding flags, actual
support of the runtime flags/stubs will be done in future changes. This
change mostly focuses on the generation of the "exportable" flags.

Utilization of the generated "exportable" flags will be done in future
changes.

Test: go test ./java
Bug: 315485740
Change-Id: I37becd1b9dd9069d7ac4abed130906df30b3fdf4
2024-01-08 07:55:49 +00:00
Treehugger Robot
208444ce5d Merge changes from topics "revert-2897484-revert-2897682-dont_limit_systemsdk-JCOOOXGAIF-BSJGJAJAWC", "revert-2897568-revert-2894701-limit_systemsdk-WNEMOTGMRS-ROJNXPXKUV" into main
* changes:
  Revert^2 "Add BUILD_BROKEN_DONT_CHECK_SYSTEMSDK"
  Revert "Revert "Limit System SDK to 34 for Java modules in the v..."
2024-01-06 17:53:41 +00:00
Colin Cross
b9176417eb Add per-module phony targets for lint checks
Simplify running lint on a module by adding a per-module phony target,
e.g. Gallery2-lint.

Bug: 216462289
Test: m Gallery2-lint
Change-Id: I9d4ab362bb116d49f00fc3f79d61d7239528d575
2024-01-05 21:09:20 +00:00
Colin Cross
cf132236e7 Merge "Translate --custom-package aapt2 flag for ResourceProcessorBusyBox" into main 2024-01-05 18:10:47 +00:00
Kiyoung Kim
6284e0a935 Merge "Generate image variation without version" into main 2024-01-05 04:57:26 +00:00
Kiyoung Kim
b5fdb2e966 Generate image variation without version
Current CC/Rust Image variations are generated with target VNDK version.
However, this is no longer valid if VNDK is deprecated. This change
generates image variation without version ("vendor", "product") if VNDK
is deprecated.

Bug: 316829758
Test: m nothing --no-skip-soong-tests passed
Test: aosp_cf_x86_64_phone build succeeded
Change-Id: I2387ed8a2632bfd9462621f882a947695ae1653d
2024-01-05 11:15:23 +09:00
Jiyong Park
7416d67f28 Revert "Revert "Limit System SDK to 34 for Java modules in the v..."
Revert submission 2897568-revert-2894701-limit_systemsdk-WNEMOTGMRS

Reason for revert: Forward fix was merged

Reverted changes: /q/submissionid:2897568-revert-2894701-limit_systemsdk-WNEMOTGMRS

Change-Id: Id857406513fbf33a20e5d3836742ebd8a0105516
2024-01-04 23:20:42 +00:00
Cole Faust
ec222c4dbb Merge "Use ApiLevel on min, target and compile Sdk version" into main 2024-01-04 21:54:08 +00:00
Sebastian Pickl
1f1662217a Revert "Limit System SDK to 34 for Java modules in the vendor pa..."
Revert submission 2894701-limit_systemsdk

Reason for revert: might be breaking builds at 318695834

Bug: 318695834

Reverted changes: /q/submissionid:2894701-limit_systemsdk

Change-Id: I71a87d0a026a444ea9d26f889b3421162e13fea9
2024-01-04 19:28:16 +00:00
Cole Faust
b765d6bd46 Don't implicitly pick up lint-baseline.xml
lintable modules currently pick up files named "lint-baseline.xml" to
use as the lint baseline implicitly. This is confusing because you could
end up using the baseline files in more modules than intended. Lint also
has a feature where it requests you remove unnecessary findings from the
baseline file, so something could be necessary for one module, but
unnecessary for another that accidentally picked up the baseline.

All modules that used to pick up the baseline implicitly have been
fixed to specify it explicitly already.

Fixes: 272769514
Test: Presubmits
Change-Id: Id17202e2d119b87ab82c18cb35410b93ed8d5071
2024-01-04 10:39:33 -08:00
Jiyong Park
ec47e99b4d Limit System SDK to 34 for Java modules in the vendor partition
This change disallows Java modules in the vendor partition to use System
SDK that is newer than API level 34; 34 is the latest allowed.

Background 1: with Trunk Stable, the system/vendor interface is released
at Q2 whereas the system/app interface is released at Q3. In other
words, at Q2, the APIs which will be added to the system SDK at Q3 are
not available. Since the system/vendor interface (which is fronzen at
Q2) is what the modules in the vendor partition will be building
against, they can't and shouldn't use those new APIs that will be added
in the future (Q3). Using those APIs is risky because there's a chance
that those APIs get removed or changed between Q2 and Q3. For example,
2024 Q2 is technically still Android U, not Android V.

Background 2: The use of Java APIs in the vendor partition had many
issues. Most significantly, those "vendor" Java apps are categorized as
part of the system partition because all Java app processes require
access to platform internal libraries that are prohibited to vendor
processes. Furthermore, since the Project Treble, the vendor partition
was re-purposed to a partition to host SoC-dependent bits - usually
HALs. Implementing HALs in Java has never been officially supported and
has had many loop holes.

We'd like to use both background 1 and 2 as a chance to disallow any
Java code in the vendor partition. However, since there are already some
Java modules in the partition, we can't suddenly ban it. The deprecation
will be made gradually, and this CL is the start.

Note that sdk_version: "current" or "system_current" is automatically
overridden into 34 or system_34. This is to prevent sudden breakage of
vendor modules that have been targetting the latest (i.e. current) API
level. They will however fail if they use APIs newer than API level 34.

Bug: 314011075
Test: m blueprint_tests
Change-Id: I59f5ac15ce9ac2ff7cc89e9c110169359077c37c
2024-01-04 13:29:04 +09:00
Colin Cross
d3f7d1a44c Translate --custom-package aapt2 flag for ResourceProcessorBusyBox
When --custom-package is specified as an aapt2 flag translate it to
--packageForR when running ResourceProcessorBusyBox.

Bug: 294256649
Test: m javac-check
Change-Id: I2c97c760ea8a0203790feda82b98e12c2dbd7b72
2024-01-03 19:43:15 -08:00
Colin Cross
a3759f98a6 Merge "Write raw files to disk instead of the ninja file" into main 2024-01-02 19:44:52 +00:00
Spandan Das
64c9e0ce6e Use the correct bootjars for hiddneapi when multiple prebuilts exist
hiddenapi processing require boot jars from apexes to determine the full
set of methods available at runtime.
When building with prebuilts, this comes via
java_import/java_sdk_library_import, which acts as a hook for
prebuilt_apex/apex_set. If we have multiple apexes in the tree, this
hook becomes 1:many. This CL prepares platform_bootclasspath to select the right
deapexerd .jar files when mutliple prebuilts exist.

Implementation details
- Create a dependency edge from platform_bootclasspath to
  all_apex_contributions (DepsMutator)
- For every boot jar, query all_apex_contributions to get the path to
  dexjar file (GenerateAndroidBuildActions)

Some other important details
- This CL does not drop the old mechanism to get the dex file (i.e. by
creating a dep on java_library). Once all mainline
modules have been flagged using apex_contributions, the old mechanism
will be dropped
- This CL has a functional change when building with source apexes. At
  ToT, the unecoded hiddenapi dex jar is used for package check and
  generating the monolithic stub file. After this change, the hiddenapi
  encoded file will be used for these operations.
  This should be fine since the
  package and dex signature do not change across the encoded and
  unencoded dex file. In fact, we already have a split today. When
  building with prebuilts, we use the encoded dex file. When building
  with source, we use the unecoded dex file.

Test: Added a unit test
Test: Manual testing in internal described below
- lunch cf_x86_64_phone-next-userdebug
- flagged com.google.android.adservices using apex_contributions
- aninja -t commands out/soong/hiddenapi/hiddenapi-stubs-flags.txt # no
  diff before and after
Bug: 308790777

Change-Id: I72c70f0ae1b587679203ea254c9c12a48e7aa782
2024-01-02 17:56:14 +00:00
Treehugger Robot
71790b154d Merge "Remove usage of OtherModuleHasProvider in dexpreopt_bootjars" into main 2023-12-21 21:58:53 +00:00
Treehugger Robot
bdfb169e90 Merge "Change target platform to LINUX-OTHER" into main 2023-12-21 17:30:08 +00:00
Sorin Basca
088e079803 Change target platform to LINUX-OTHER
This is needed to be compatible with JDK 21+ which does not allow
other platforms (apart from the ones listed in the modules
plugin) when linking a system image.

Note the value of target platform doesn't matter to us, we just
choose a closest one to replace "android".

Bug: 313924276
Test: m EXPERIMENTAL_USE_OPENJDK21_TOOLCHAIN=true
Change-Id: Id805f31089fdbd78bf4db06c89ae391f25563448
2023-12-21 11:49:35 +00:00
Søren Gjesse
c97dfe42b9 Merge "Remove setting com.android.tools.r8.emitRecordAnnotationsExInDex" into main 2023-12-21 09:47:47 +00:00
Spandan Das
412b33a6e7 Merge "Use the correct bootjars when multiple prebuilt apexes exist" into main 2023-12-20 19:00:49 +00:00
Spandan Das
5be6333692 Use the correct bootjars when multiple prebuilt apexes exist
hiddenapi and dexpreopt require boot and system server jars from apexes.
When building with prebuilts, this comes via
java_import/java_sdk_library_import, which acts as a hook for
prebuilt_apex/apex_set. If we have multiple apexes in the tree, this
hook becomes 1:many. This CL prepares dex_bootjars to select the right
deapexerd .jar files when mutliple prebuilts exist.

Implementation details
- Update prebuilt module types (prebuilt_apex/apex_set) and source
  apexes to set a map of
  library name to dex jar path on host.
- dex_bootjars will access the path of the .dex jar on host via the
  provider. These then
  copied/installed to the right locations.

This CL does not drop the old mechanism to get the dex file (i.e. by
creating a dep on java_library). Once all mainline
modules have been flagged using apex_contributions, the old mechanism
will be dropped

Bug: 308790457
Test: git_master-art-host:art-gtest https://android-build.corp.google.com/builds/abtd/run/L21500030000926533
Test: git_main:art_standalone_dexpreopt_tests https://android-build.corp.google.com/builds/abtd/run/L99000030000891212
Test: Added a unit test that checks that the right .jar is selected
when multiple prebuilts exists

Change-Id: I6ef94135b9303a35135810930af4b641df13a583
2023-12-20 16:43:01 +00:00
David Srbecky
f01e2f7308 Merge "Revert^6 "Enable dex container (DEX v41) for the whole system"" into main 2023-12-20 01:37:06 +00:00
Cole Faust
30e32f67fc Merge changes I8b352305,Iadf9e324 into main
* changes:
  Sandbox CtsApkVerityTestDebugFiles
  Include "soong" in sandboxed out paths
2023-12-20 01:35:40 +00:00
Spandan Das
bc114d2ff9 Remove usage of OtherModuleHasProvider in dexpreopt_bootjars
Since OtherModuleHasProvider will be deprecated soon, replace it with OtherModuleProvider

Test: go build ./java
Change-Id: I79736e44d85bc6e8c97f08ebf783b40533a3e6ae
2023-12-20 01:27:29 +00:00
Colin Cross
31a674571e Write raw files to disk instead of the ninja file
Writing raw files as rules in the ninja file unnecessarily bloats
the ninja file.  Write files immediately to disk instead to files
based on the hash of the contents, and then emit ninja rules to
copy the files into place during the build.  Delete obsolete files
in a singleton at the end of analysis.

Bug: 306029038
Test: Run: m libc_musl_version.h
           touch build/soong/Android.bp
           m libc_musl_version.h
      libc_musl_version.h/genrule.sbox.textproto is not recopied.
Test: Run: lunch aosp_cf_x86_64_phone-userdebug
           m libc_musl_version.h
	   lunch aosp_x86_64-userdebug
	   m libc_musl_version.h
	   lunch aosp_cf_x86_64_phone-userdebug
	   m libc_musl_version.h
      libc_musl_version.h/genrule.sbox.textproto is recopied but restat prevents rerunning the genrule.
Test: Run: touch out/soong/raw-aosp_cf_x86_64_phone/00/foo
           touch build/soong/Android.bp
	   m nothing
      out/soong/raw-aosp_cf_x86_64_phone/00/foo is removed.
Change-Id: I172869c4d49565504794c051e2e8c1f7cf46486e
2023-12-19 16:33:46 -08:00
Spandan Das
96feedc555 Merge "Use the correct prof file when multiple prebuilt apexes exist" into main 2023-12-20 00:02:20 +00:00
Spandan Das
da739a30a6 Use the correct prof file when multiple prebuilt apexes exist
Generating boot image requires a .prof file provided by the ART apex.
When building with prebuilts, this comes via the
prebuilt_bootclasspath_fragment module, which acts as a shim for
prebuilt_apex/apex_set. If we have multiple prebuilt apexes in the tree,
this shim becomes 1:many. This CL prepares dex_bootjars to select the
right .prof file when multiple prebuilts exist.

Implementation details
- Update deps mutator of dex_bootjars to create a dep on
  all_apex_contributions. The latter contains information about which
  apex is selected in a specific release configuration. dex_bootjars
  will create a dependency on the selected apex in a postdeps phase
  mutator.
- All apex module types (apex, prebuilt_apex and apex_set) will set a
  provider that contains info about the location of the .prof file on
  host
- dex_bootjars will access the provider of the selected apex to get the
  location of the .prof file

This CL does not drop the old mechanism to get the .prof file (i.e. by
creating a dep on {prebuilt_}bootclasspath_fragment). Once all mainline
modules have been flagged using apex_contributions, the old mechanism
will be dropped

Bug: 308790457
Test: Added a unit test that checks that the right .prof is selected
when multiple prebuilts exists

Change-Id: I40fdb21416c46bed32f6ff187ce5153711ec2c69
2023-12-19 22:37:29 +00:00
Cole Faust
e8561c6108 Include "soong" in sandboxed out paths
Previously, the path to built files in the sandbox would be
out/.intermediates/... instead of out/soong/.intermediates/....

After this cl, it will be out/soong/.intermediates/.... This makes
it more consistent with the non-sandboxed paths, which is easier for
developers.

CtsApkVerityTestDebugFiles is a genrule that's used to find the paths
to other modules. Developers were expected to build it, then copy all
the files listed in its output file to a temporary directory. Those
paths would be wrong before this change.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py CtsApkVerityTestDebugFiles
Change-Id: Iadf9e3240a2c828567e46b6b02cc14004f30e8bf
2023-12-19 12:14:01 -08:00
LaMont Jones
aa005ae080 move CollectDependencyAconfigFiles to android
This needs to be called by some modules in android.

Bug: 308625757
Test: manual
Change-Id: I389fcfd88a3f4bd85a9218fdd4dd66d8a239bb67
2023-12-19 19:34:00 +00:00
Søren Gjesse
8a5b32d0cf Remove setting com.android.tools.r8.emitRecordAnnotationsExInDex
System property was removed in
https://r8-review.git.corp.google.com/c/r8/+/82140, as the
system property com.android.tools.r8.emitRecordAnnotationsInDex
is the only system property for not desugaring records.

Test: Existing
Fixes: b/316501817
Change-Id: I057a18c9e02a99365e910d3128890fd481e93541
2023-12-19 10:49:58 +01:00
Spandan Das
fae468ef14 Move validation from FindDeapexerProviderForModule to rdeps
FindDeapexerProviderForModule raises an exception if multiple apexes in
the tree has an export dep on the java module. In prepartation to
support multiple prebuilts, move this error check out of
FindDeapexerProviderForModule and into rdeps. i.e. raise an exception
only if an rdep calls DexJarBuildPath

- This should be a no-op for now.
- In the short-term future, a java import module will be allowed to have
  multiple deapexers. An error will be raised if anyone actually tries
  to depend on the dexjar
- In the long-term future, this function will be removed. All processing
  will be done at the prebuilt apex level and not at the prebuilt java
  library level

Since this check now happens in the moduleCtx of rdeps, add some
additional props to unit tests to ensure that it does not exit early on
unrelated validation checks (e.g. hidden_api prop is not set)

Test: go test ./apex ./java
Bug: 308790457

Change-Id: I3323d993c1ea8f43305834cae8e65b6fe41dfefd
2023-12-18 23:19:47 +00:00
Spandan Das
2069c3f74d Move dexpreopt processing from java_*_import to prebuilt_apex
dexpreopt of apex system server from prebuilts involves three soong
modules
1. prebuilt_apex / apex_set
2. an internal deapexer module created by the prebuilt apex
3. java_import/java_sdk_library

(3) acts as a shim for the deapexer to set the dexjar extracted from the
prebuilt apex. This methodolody requires a 1:1 correspondence across the
three modules

This breaks down when we have multiple versions of the same prebuilt
apex in the tree. In preparation for this, move the dexpreopt
processing from (3) to (1). Each prebuilt_apex will create the necessary
rules for dexpreopting the jars deapexed from itself. In the future,
apex_contributions will be used to pick which service-foo.{odex|.vdex} to
install depending on which prebuilt apex is selected.

Implementation details
- Embed dexpreopter in prebuiltApex structs so that this module type can
  register the dexpreopt rules. Since a single apex can have multiple
  system server jars, this also requires creating an additional scope in
  dexpreopt.go to prevent name collisions
- Add the dexpreopt modules as required in initApexFilesForAndroidMk
- Add the depreopt modules to androidMk in AndroidMkEntries. Drop the
  equivalent from java_import and java_sdk_library_import

Bug: 308790457
Test: existing soong unit tests
Test: lunch cf_x86_64_phone-next-userdebug && m out/target/product/vsoc_x86_64/system/apex/com.google.android.adservices.apex
Test: Verified that the above command installs
/out/target/product/vsoc_x86_64/system/framework/oat/x86_64/apex@com.android.adservices@javalib@service-adservices.jar@classes.{odex|vdex} and the equivalent files of service-sdksandbox

Test: presubmits

Change-Id: I01cea8956d2857fb864b415e73d3d2686d069b5e
2023-12-18 23:17:26 +00:00
Dan Shi
7022550d0e Revert^6 "Enable dex container (DEX v41) for the whole system"
This reverts commit a33691288e.

Reason for revert: b/316609623

Change-Id: I7438f3e55a29cf07da907d04a97b1f7bcc85956c
2023-12-15 21:37:53 +00:00
Chris Antol
6482cb97cd Merge "Revert^5 "Enable dex container (DEX v41) for the whole system"" into main 2023-12-15 19:01:34 +00:00
Chris Antol
a33691288e Revert^5 "Enable dex container (DEX v41) for the whole system"
This reverts commit d45836eb38.

Reason for revert: Still breaks tests

Bug: 314212435
Change-Id: I35867878c9a8b2aa3d64092a5326c42191569adc
2023-12-15 18:15:51 +00:00
David Srbecky
a6bc7c87bd Merge "Revert^4 "Enable dex container (DEX v41) for the whole system"" into main 2023-12-15 13:05:51 +00:00
Colin Cross
5a37718c95 Convert ModuleProvder to generic providers API
Convert all of the callers of ModuleProvider/ModuleHasProvider to use the
type-safe android.SingletonModuleProvider API.

Bug: 316410648
Test: builds
Change-Id: I6f11638546b64749e451cebbf33140248dc1d193
2023-12-14 16:12:22 -08:00
Colin Cross
313aa5475f Convert OtherModuleProvider to generic providers API
Convert all of the callers of OtherModuleProvider/OtherModuleHasProvider
to use the type-safe android.OtherModuleProvider API.

Bug: 316410648
Test: builds
Change-Id: Id77f514d68761a262d9ea830a601dbed804bbbe5
2023-12-14 16:12:22 -08:00
Colin Cross
ff694a8c88 Convert Provider to generic providers API
Convert all of the callers of Provider/HasProvider to use the type-safe
android.ModuleProvider API.

Bug: 316410648
Test: builds

Change-Id: I73479de1625fa2865b6c73444cd477e50d56dc5a
2023-12-14 16:12:21 -08:00
Colin Cross
402130276c Convert SetProvider to generic providers API
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.

Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
2023-12-14 16:12:20 -08:00
Colin Cross
bc7d76cca2 Convert NewProvider/NewMutatorProvider to generic providers API
Convert all of the callers to NewProvider and NewMutatorProvider
to use a generic type parameter instead of an example object.

Bug: 316410648
Test: builds
Change-Id: Ic9cdafc87336e26730d3fd596df05de0e7267542
2023-12-14 16:12:20 -08:00
Colin Cross
3c0a83d19f Use generics for providers API
Using generics for the providers API allows a type to be associated
with a ProviderKey, resulting in a type-safe API without that doesn't
require runtime type assertions by every caller.

Unfortunately, Go does not allow generic types in methods, only in
functions [1].  This prevents a type-safe API on ModuleContext, and
requires moving the API to be functions that take a ModuleContext as
a parameter.

This CL creates the new API, but doesn't convert all of the callers.

[1] https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#no-parameterized-methods)

Bug: 316410648
Test: builds
Change-Id: I3e30d68b966b730efd968166a38a25cc144bd6de
2023-12-14 16:12:20 -08:00
Colin Cross
e8eeec913f Fix TestAarImportProducesJniPackages/aar-no-jni
TestAarImportProducesJniPackages was attempting to assert that an
aar_import module always had a JniPackageProvider, but was instead
asserting that the return type was always a JniPackageInfo.  Since
ModuleProvider returned the zero value of JniPackageInfo even when
there was no provider that was always true.

Fix aar_import to always set JniPackageProvider.

Test: TestAarImportProducesJniPackages
Change-Id: Idaf106e14373490d4eb807892e174aaaf094bbcf
2023-12-14 16:12:20 -08:00
Cole Faust
c01104234e Merge "Allow compile_data on all java modules" into main 2023-12-14 21:44:46 +00:00
Cole Faust
2b64af861a Allow compile_data on all java modules
art java_test modules need to specify compile_data, make it common
to all java modules.

Bug: 307824623
Test: m lint-check
Change-Id: I68640f14137f9cadaf0c454d3b5abc9e2d1d9b4b
2023-12-13 18:22:18 -08:00
Yu Liu
6dc93f9a09 Properly package aconfig files for vendor partition
Bug: 311173471
Test: Unit tests
Change-Id: Ibb857b69c3f83326a9ff5732e11dd09887e4ba6e
2023-12-14 01:19:35 +00:00
Treehugger Robot
aca0c185fc Merge "Use --revert-annotation instead of --hide-annotation" into main am: 550a0dab0d am: f384a08950 am: 0e02a14a2b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2870808

Change-Id: If0e5da2148bc51ae4b952f47f92f6b941cbeb7bc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-13 03:01:10 +00:00
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
Colin Cross
5c298e2c36 Merge "Remove ConvertWithBp2build implementations" into main am: a72573a727 am: cd4b2f21cd am: 8bb537ba9c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2864663

Change-Id: I86ea781dcc4761078a49ee825c47d11fde9d91be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-12 00:29:45 +00:00
Treehugger Robot
22620b7331 Merge "Add compile_data for android apps" into main am: b49f038231 am: c1e6e93adf am: 316e403735
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2866314

Change-Id: Id9f9a4ad9fc150c7dfd2e48062e1e4211239f284
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-12 00:01:26 +00:00
Tor Norbye
db119527fd Merge "303434307: Enable flagged API checking" into main am: 2624653aa9 am: 142049d248 am: 6cd2ac1d2d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2864659

Change-Id: Id0fae5a7af67a7bba7ccd3344c71d2726e941593
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-11 23:41:00 +00: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
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
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
Cole Faust
a8ac7bd53f Merge "Fix typo in the comment" into main am: 2237d24894 am: 558e2bd19c am: e0be8911de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2865414

Change-Id: I0c0b71ed63a2f1fb142209c86da25baeb9956448
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 19:10:50 +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
59bb904d6c Merge changes from topic "aconfig_dump_map" into main am: 25c187cc7d am: 1ed5d5ca20 am: 1befeeb5e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2854663

Change-Id: I18069b9fa74f1c72527bff397c61bc5510e7a684
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-08 11:31:22 +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
Colin Cross
e8ce5531a4 Merge aconfig files per-module am: d788b3e6cb am: 4c803a0355 am: 09e464d510
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2860765

Change-Id: I51631e841ccab5b061199fe03247394a451853af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-07 23:42:56 +00: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
e4bc39a3af Merge changes from topic "code_metadata" into main am: 4c3e2df157 am: d798f5c879 am: 519452c5ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2852607

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

Change-Id: Idcbb54dea58ff61ad430eee2e21b79bf01eb7219
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-06 09:29:54 +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
David Srbecky
d45836eb38 Revert^4 "Enable dex container (DEX v41) for the whole system"
This reverts commit 0968a93679.

Reason for revert: Reland

Change-Id: I78a0097b9bea6da83dbab2fd507670bbf2edab35
2023-12-05 12:01:40 +00:00
Colin Cross
08aa480493 Merge "Add TestContext parameter to ContentFromFileRuleForTests" into main am: 2998c33d43 am: e4f28b5a03 am: 602e7436cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817720

Change-Id: I9389644aa173115ea9134e9db4f5154a5501eb96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 02:18:16 +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
e4f28b5a03 Merge "Add TestContext parameter to ContentFromFileRuleForTests" into main am: 2998c33d43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817720

Change-Id: If970d7ed844d01913dae37cf1398248714775814
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-05 01:09:37 +00:00
Colin Cross
2998c33d43 Merge "Add TestContext parameter to ContentFromFileRuleForTests" into main 2023-12-05 00:29:10 +00:00
Jeff Sharkey
433be482ae Merge "Include Ravenwood tests in general-tests." into main 2023-12-04 18:15:35 +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
2e284d4698 Merge "Revert^3 "Enable dex container (DEX v41) for the whole system"" into main am: 3d11d51733 am: 96e84f84ac am: c6176eb969
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2852551

Change-Id: Ibaf846649f57fb4c1b403462c45dd5373a6eec03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 17:26:10 +00:00
Serdar Kocdemir
3199916366 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: If15286412361df19293b5637f84f430840a87321
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 16:31:58 +00: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
e90dc4b4fb Merge "Revert^2 "Enable dex container (DEX v41) for the whole system"" into main am: 8e1efb7fc5 am: 0cc9d2673f am: a8c63ff7bf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2853426

Change-Id: I413cc8b290bf3497ac28898f02ca699d081fbb93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-01 00:48:42 +00:00
David Srbecky
c65e421074 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: Ifb7a0186a73913b9d8c88f5c97a9ac116cf0ffc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-30 23:53:34 +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
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
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
affccf97fc 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: I29dc474a19bee00b5224b28b3dc279e80fe10668
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-30 22:31:48 +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
Jeff Sharkey
7a19abf260 Include Ravenwood tests in general-tests.
EngProd has indicated that we need to be included in that suite to
support TEST_MAPPING files in their infrastructure.

Bug: 308854804
Test: TH
Change-Id: I763b033f0f5f275091db45ab62df6af48dcddc66
2023-11-30 20:20:31 +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
3888f701bf Merge "Don't write transitive dependencies to Android-${TARGET_PRODUCT}.mk" into main am: 556ba81849 am: c65780626c am: bd149b1c8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2842060

Change-Id: I6cbacf8aaaa93a4003d5479ca5408fd47aa02b04
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-30 02:10:44 +00:00
Colin Cross
4dea1ca543 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: Idca67d76d1d2690458535ec762cc4c9459f541d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-30 01:40:03 +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
33658590bc Merge "Support experimental building with OpenJDK 21" into main am: 8f7ee30d21 am: 26539fd5e8 am: a334a87934
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2853425

Change-Id: Iace8a28440c7ca1d374465b761abeddaa9b16e8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 22:16: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
e7555604b4 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: Ibc822a51e822945bc409e3d8c041b65528e63be9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 21:08:17 +00:00
Ramya Subramanian
1cd12824cd Merge "Revert "Enable dex container (DEX v41) for the whole system"" into main am: 29e05d1007 am: ff5cf349f5 am: cd13382e8e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2853365

Change-Id: I5067d85629781bad7b08ab795a58f39223138f42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 20:38:32 +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
98950d9e60 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: Ifcc6dcdb148e08763fb1917ac888481a1fbe3007
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 19:42:24 +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
Anas Sulaiman
ea5c7509d2 Merge "allow specifying remote caching opt for rewrapper" into main am: 80117e6c4f am: 7eb74575b5 am: 45cbc5dea1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2838517

Change-Id: Ia0d3b5c647bb081794f83aa268a1615f54368d4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 19:16:19 +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
6198399c68 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: I3788c122d306a878746083bb4ad32425f63ed46e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 18:02:40 +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
6bdb84acd0 Merge "Remove PreoptExtractedApk." into main am: ba45ba5763 am: c6c66b193c am: 0b4994ea92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2848255

Change-Id: Ieadc98f5209863d4af8bde5d11018efa4e403779
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 11:54:16 +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
Jiakai Zhang
c6c66b193c Merge "Remove PreoptExtractedApk." into main am: ba45ba5763
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2848255

Change-Id: Ic59752b306914d7c0fc3f3fe58622760364edad6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 10:50:34 +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
Rico Wind
c761435b78 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: I389f9fef427198e74d5ded5a42c967189dc7e5eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 10:49:42 +00:00
Jiakai Zhang
ba45ba5763 Merge "Remove PreoptExtractedApk." into main 2023-11-29 10:17:29 +00:00
Rico Wind
e2119ee0cc Merge "Reapply "Use R8 for resource shrinking"" into main 2023-11-29 08:32:21 +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
a2b2c26986 Merge "Enable dex container (DEX v41) for the whole system" into main am: 7d813e0dba am: 66dd52b74d am: ec7bbc9487
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2238838

Change-Id: Id039ea1fd44251d51f03fdc66034823402015086
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 02:12:23 +00:00
Treehugger Robot
7e340dbf1d 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: I4fdd0d1ccb9e79489d79504eca526a8590ee8ace
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-29 01:08:39 +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
Rico Wind
20c2010030 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

Ignore-AOSP-First: Merge does not apply cleanly

Change-Id: Ib8a6fb128084e994325b975c46a036cb41494654
2023-11-28 13:47:02 +00: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
fb98d76a87 Merge "Change position of R8/D8 flags on the command line." into main am: ea5bb25378 am: efb785c929 am: 59bdf8e28b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2845918

Change-Id: Ieeb159d29328927744e463e1731e667f07449e54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-27 17:19:13 +00:00
Jamie Garside
740f7cd2b3 Add the ability for a java_sdk_library to depend on another. am: e570ace2e4 am: b5429e879e am: 20f9129baf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2844082

Change-Id: If8b932e404bb6a76a6648950cbee3a97f973e82e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-27 17:16:59 +00:00
David Srbecky
97038a2f06 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: Iae423895aebad3c852ea71bc0765d07d10a8ff64
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-27 16:29:01 +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
3dfe5ad6bf 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: Ie8fdd2113b502d001894b3ba7a500e0b1676ce26
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-27 16:28:15 +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
4a957251a4 Merge "Use result.Config.PrebuiltOS() to get prebuiltHost in test_spec_test" into main am: 9be9a126d1 am: b0f8d2a698 am: 22d89e0ab0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2841420

Change-Id: Id61cef9119b9daa1964dc661e3cca74684865a77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-22 02:27:06 +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
Treehugger Robot
b0f8d2a698 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: I2cc6db4f075abd030002b9b75c4a11098c0822c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-22 01:14:11 +00:00
Aditya Choudhary
356296240e Use result.Config.PrebuiltOS() to get prebuiltHost in test_spec_test
Bug: 312536783
Bug: 312536905
Test: m nothing --no-skip-soong-tests -j96

Change-Id: I1e12281927269d42ae796348b223030acfd6ecfa
2023-11-21 23:14:01 +00:00
Aditya Choudhary
2b6cc30c21 Add test for soong/testing/test_spec. am: b7b3de8307 am: 64b6c645e8 am: 3b80477ff3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2836072

Change-Id: Ic88791dcbad6aef5325898c84a6f966133d18d52
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-21 20:48:32 +00:00
Aditya Choudhary
64b6c645e8 Add test for soong/testing/test_spec. am: b7b3de8307
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2836072

Change-Id: Iec9eeceadbd2e86055a4f2e6eecd77443f7eb05a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-21 19:44:34 +00:00
Aditya Choudhary
07c048b875 Add test for soong/testing/test_spec. am: b7b3de8307
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2836072

Change-Id: I9d1266accf8fa098befce4d5d2924e63fef7d699
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-21 19:44:34 +00:00
Aditya Choudhary
b7b3de8307 Add test for soong/testing/test_spec.
This CL adds test for test_spec.go and all_test_specs.go (singleton).

Bug: 296873595
Test: m nothing --no-skip-soong-tests -j96

Change-Id: I5010c68512e75d1b9a337c02da86faac15e376fe
2023-11-21 17:31:07 +00:00
David Srbecky
1719f512f5 Merge "resourceshrinker: Add dexContainerExperiment flag" into main am: 3f7d0f6797 am: 918285adce am: d56c89f1ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2828314

Change-Id: Ibf153e902f8ae7f209c060bd8b412b54cbc5d3b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-21 09:29:58 +00:00
David Srbecky
2afaecefef Merge "resourceshrinker: Add dexContainerExperiment flag" into main am: 3f7d0f6797
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2828314

Change-Id: I7bafad2a6640244f16bd4d5986068b2e4bda882e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-21 08:43:52 +00:00
David Srbecky
918285adce Merge "resourceshrinker: Add dexContainerExperiment flag" into main am: 3f7d0f6797
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2828314

Change-Id: I18e530107a0fe3c9185f86f7c69d37b49dd4e64f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-21 08:43:33 +00:00
David Srbecky
3f7d0f6797 Merge "resourceshrinker: Add dexContainerExperiment flag" into main 2023-11-21 08:30:23 +00:00
Colin Cross
1d470f3066 Change deps of ctx.Install* from Paths to InstallPaths am: 09ad3a6505
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2834991

Change-Id: Id63655decd89ecc2a8a0319b28c1c2ae26a14de7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-20 20:21:07 +00:00
Colin Cross
7dcb26f327 Change deps of ctx.Install* from Paths to InstallPaths am: 09ad3a6505
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2834991

Change-Id: I63828eebd77e8e88592107a6e5cee9c291cacb42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-20 20:20:36 +00: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
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
Anton Hansson
eaaaee2ca4 Merge "Re-enable the AnnotationExtraction error" into main 2023-11-17 16:25:29 +00:00
Anton Hansson
7ecf7e9331 Merge "Re-enable the InvalidNullabilityOverride check" into main 2023-11-17 11:19:21 +00:00
Inseob Kim
550a615b4d Merge "Add support for auto-generated characteristics RRO" into main am: b5d713f2cb am: 99913d4e59 am: 6b52e7aabe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817177

Change-Id: I7bca74e210529ae6c2fbcb7746e06b7d4a493e8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 06:47:43 +00:00
Inseob Kim
99913d4e59 Merge "Add support for auto-generated characteristics RRO" into main am: b5d713f2cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817177

Change-Id: Ie4a539f9001bdbd2fc91fedbfc9869a1c35b15d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 05:43:44 +00:00
Inseob Kim
7110872f1e Merge "Add support for auto-generated characteristics RRO" into main am: b5d713f2cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817177

Change-Id: I7bcb17b8ef12327f604c2043b7b262b10c8d14d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-17 05:43:37 +00:00
Inseob Kim
b5d713f2cb Merge "Add support for auto-generated characteristics RRO" into main 2023-11-17 05:02:28 +00:00
Inseob Kim
34dc4cd738 Add support for auto-generated characteristics RRO
Setting Generate_product_characteristics_rro will automatically generate
an RRO package which contains resources with
'product="{PRODUCT_CHARACTERISTICS}"'. The RRO package will be installed
to /product partition. The app will be compiled with '--product
default', making the app identical to all targets.

Motivation for this change is to minimize divergence of system.img.

Bug: 294799593
Test: boot and idmap2 dump
Change-Id: I1371f7410a1ecf337e1f73214b024af39aa6d57a
2023-11-17 11:15:32 +09:00
Treehugger Robot
d5f9767046 Merge "Add contribute_to_android_api property in java_sdk_library" into main am: 7fcb470251 am: 5c8f4f446d am: eb07d02267
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2832851

Change-Id: I8c34010c6f3acbefa093d722116d83418ecc5f20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 23:50:56 +00:00
Treehugger Robot
5c8f4f446d Merge "Add contribute_to_android_api property in java_sdk_library" into main am: 7fcb470251
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2832851

Change-Id: I9be66305f8b2da9ea8026bf197f578961e088ec7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 22:45:50 +00:00
Treehugger Robot
875f657986 Merge "Add contribute_to_android_api property in java_sdk_library" into main am: 7fcb470251
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2832851

Change-Id: I959ea33725b6222a3587e91a677e2efa94612caf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 22:45:42 +00:00
Treehugger Robot
7fcb470251 Merge "Add contribute_to_android_api property in java_sdk_library" into main 2023-11-15 22:25:22 +00:00
Colin Cross
3bccd2a114 Merge "Stop collecting path entry for module_bp_java_deps.json from each module type" into main am: d7812415c3 am: d50b463e66 am: 2b8a10bfa9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2831928

Change-Id: I902074c1744b77317f593aed8d5ab2b504ab6904
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 21:54:22 +00:00
Colin Cross
a46cd009b6 Merge "Stop collecting path entry for module_bp_java_deps.json from each module type" into main am: d7812415c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2831928

Change-Id: Id1f7261d8b8d40b058b91d7fff9eaedbf395fff8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 21:21:42 +00:00
Colin Cross
d50b463e66 Merge "Stop collecting path entry for module_bp_java_deps.json from each module type" into main am: d7812415c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2831928

Change-Id: I13c077e58d39a86ce14d3b89551b369d6a9cc5fb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 21:19:28 +00:00
Colin Cross
d7812415c3 Merge "Stop collecting path entry for module_bp_java_deps.json from each module type" into main 2023-11-15 21:01:38 +00:00
Jihoon Kang
80456fdec4 Add contribute_to_android_api property in java_sdk_library
The default-false bool property `contribute_to_android_api` will be used to signify whether the java_sdk_library module contributes to an api
surface (i.e. listed in frameworks-base-api.bootclasspath or not).
If the property is set to true, the module's stub jar can be
generated from .txt files.

Currently, the property is a no-op. The property will be utilized in the
child changes.

Test: m nothing
Bug: 276958307
Change-Id: I617802ec352c7055579ce92ea3de43f10cac1da4
2023-11-15 20:40:37 +00:00
Colin Cross
a644c263dd Stop collecting path entry for module_bp_java_deps.json from each module type
The jdepsGeneratorSingleton can get the module path directly, it doesn't
need to be collected by each module type that implements IDEInfo.  Fixes
module types (like android_library) that didn't reach the code that
collected the path.

Bug: 309835196
Test: out/soong/module_bp_java_deps.json contains path for ExtServices.core
Change-Id: If8cb81b4f708e0367f156ade164bee253bf53492
2023-11-15 11:40:48 -08:00
Aditya Choudhary
a8348d3805 Merge "Add proto for Test ownership metadata." into main am: d97bf36469 am: beff7f2a0a am: 3c5da107ee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2774872

Change-Id: Iabb50bbc44dbb51183b6ee97c14d157e460782de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 12:39:16 +00:00
Aditya Choudhary
188979638c Merge "Add proto for Test ownership metadata." into main am: d97bf36469
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2774872

Change-Id: Ibaee3387122face18ea83b77850ef65959771d79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 11:20:30 +00:00
Aditya Choudhary
beff7f2a0a Merge "Add proto for Test ownership metadata." into main am: d97bf36469
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2774872

Change-Id: Idae0ffe939cb25b9c8626a39d036535691ee38f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-15 11:19:37 +00:00
Aditya Choudhary
d97bf36469 Merge "Add proto for Test ownership metadata." into main 2023-11-15 10:30:50 +00:00
Aditya Choudhary
9b59352a82 Add proto for Test ownership metadata.
This Cl adds a new rule to Soong to generate test spec metadata. Also, this CL adds a provider in various test module to provide test spec related data to the Soong rule.
Will add providers and test code to other Module in the future changes.
Provider added for the following test modules in this change: android_robolectric_test, android_test, bootclasspath_fragment_test, java_test, java_test_host, python_test, python_test_host, sh_test,and sh_test_host.

Bug: 296873595

Change-Id: I5f89f72d5874bb7838ae357efdb8c6ca208e18a7
2023-11-15 09:08:02 +00:00
Alyssa Ketpreechasawat
4192f520b8 Merge "Skip unknown check in bootclasspath_fragment (source version) if prebuilt version is in use." into main am: 378c7a3953 am: 4e56c8b8ac am: db03242540
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2822393

Change-Id: Ibf4177f2cbad2c4022291d7e44ef7aa4bfd15ab2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-14 20:42:55 +00:00
Alyssa Ketpreechasawat
fb6abbc305 Merge "Skip unknown check in bootclasspath_fragment (source version) if prebuilt version is in use." into main am: 378c7a3953
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2822393

Change-Id: Ifb8a17a7dbf6f73bb727b2fce78b622cb09181a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-14 19:46:02 +00:00
Alyssa Ketpreechasawat
4e56c8b8ac Merge "Skip unknown check in bootclasspath_fragment (source version) if prebuilt version is in use." into main am: 378c7a3953
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2822393

Change-Id: Ie94799e955a6dc3d4a31c2ea0376945a2982e8fc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-14 19:44:58 +00:00
Alyssa Ketpreechasawat
378c7a3953 Merge "Skip unknown check in bootclasspath_fragment (source version) if prebuilt version is in use." into main 2023-11-14 19:13:32 +00:00
David Srbecky
8f354780e6 resourceshrinker: Add dexContainerExperiment flag
Bug: 249922554
Test: build with CL/2238838
Change-Id: I369ebe616caa9ae880b71abb0bafa3f909ebcdae
2023-11-14 12:06:50 +00:00
Treehugger Robot
975d4d70cd Merge "Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage." into main am: 34778a9301 am: 4aa0474c14 am: ceaeebb4d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2822402

Change-Id: Id3305a2b8cc4b8a4cae748a1016a8a59353470db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-10 21:13:01 +00:00
Treehugger Robot
1c9977aece Merge "Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage." into main am: 34778a9301
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2822402

Change-Id: Ib046322e1c6c6416b9e156630db46f7f8fe5c59f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-10 19:20:07 +00:00
Treehugger Robot
4aa0474c14 Merge "Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage." into main am: 34778a9301
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2822402

Change-Id: I7a3d9febdd7fbef957e3f295784776985aabf9c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-10 19:18:23 +00:00
Treehugger Robot
34778a9301 Merge "Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage." into main 2023-11-10 18:47:19 +00:00
Anton Hansson
a6ae274e3b Re-enable the AnnotationExtraction error
This prevents errors in typedef definitions. Re-enable it.

Ignore-AOSP-First: This error is not being re-enabled in AOSP yet
Bug: 309971481
Test: m checkapi
Change-Id: If9f0e580cda62d0021e82b1831746b3d15d1bfbd
2023-11-10 16:19:27 +00:00
Anton Hansson
d972a088d9 Re-enable the InvalidNullabilityOverride check
It's been disabled previously due to pre-existing failures. Baseline
those and remove the disabling.

Ignore-AOSP-First: This error is not being re-enabled in AOSP yet
Bug: 222738070
Test: m checkapi
Change-Id: I3382152186d7d8f63da7c1cc95d3ef962f422642
2023-11-10 09:57:55 +00:00
Anton Hansson
8de1f48965 Merge "Re-enable the bannedThrow check" into main 2023-11-09 20:50:00 +00:00
Jiakai Zhang
2398442ec0 Change OnlyPreoptBootImageAndSystemServer to OnlyPreoptArtBootImage.
OnlyPreoptBootImageAndSystemServer was for making the eng build faster.
This change makes it even faster.

Bug: 309011617
Test: Presubmit
Change-Id: If9001e99593b57deafa7b56f0ca6b3d4d80f56d3
2023-11-09 16:50:58 +00:00
Alyssa Ketpreechasawat
a0cf0a4a66 Skip unknown check in bootclasspath_fragment (source version) if prebuilt version is in use.
Following aosp/2822531, when MediaProvider prebuilt is enabled, framework-pdf (new jar) will be removed from PRODUCT_APEX_BOOT_JARS. Subsequently there will be an error around the inconsistency (unknown) between bootclasspath_fragment (source version of MP with framework-pdf in its content) and PRODUCT_APEX_BOOT_JARS (framework-pdf removed). Since the source version of bootclasspath_fragment is not in use, we should ignore this check. See more detail in go/stale-mainline-prebuilts (issue from changes in framework/service jars in existing apexes).

Bug: 304719212
Test: lunch cf_x86_phone-next-userdebug & m
Test: lunch cf_x86_phone-trunk-userdebug & m
Change-Id: I0f62277a9e65522bf5a4ea1ae33c166f996c37d5
2023-11-09 12:54:09 +00:00
Anton Hansson
b3a9fcf664 Re-enable the bannedThrow check
It's been disabled previously due to pre-existing failures. Baseline
those and remove the disabling.

Bug: 222738070
Test: m checkapi
Ignore-AOSP-First: This error is not being re-enabled in AOSP yet
Change-Id: Ia4f91f1470a5bce332df1896b81550276c4b174d
2023-11-09 10:06:04 +00:00
Spandan Das
e9f86b6b0b Merge changes from topic "apex_contributions_build_flags" into main am: c31b24977e am: e48000d86f am: 874d391f63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2808754

Change-Id: Iea3c3e3ac6b9ae49c2b54bf78831495b19637df4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-09 03:17:22 +00:00
Spandan Das
26da80db09 Merge changes from topic "apex_contributions_build_flags" into main am: c31b24977e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2808754

Change-Id: I5b8b12c7e74c6342807667587d0941a0c366f222
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-09 02:03:15 +00:00
Spandan Das
e48000d86f Merge changes from topic "apex_contributions_build_flags" into main am: c31b24977e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2808754

Change-Id: Ia7b7a22e9be58e37db8d188eff8cda2a8dc408e8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-09 01:58:15 +00:00