Commit graph

6962 commits

Author SHA1 Message Date
Treehugger Robot
3a9ce197a9 Merge changes I86f30b99,I2769c0d5 into main am: 3fb2002c9e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2746855

Change-Id: Ie61359bea67a9afdf9e1e2e3e29568edfeccba79
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-08 16:31:33 +00:00
Treehugger Robot
3fb2002c9e Merge changes I86f30b99,I2769c0d5 into main
* changes:
  Do not convert resource dirs without resources
  Do not convert java libraries with core_platform
2023-09-08 16:04:45 +00:00
Liz Kammer
33dddf5a7e Do not convert resource dirs without resources
Previously we would convert to java_resources when there were no
resources and get an error.

Test: b build //external/libphonenumber/... --config=android
Change-Id: I86f30b993a3ffdb20000f6a4c5261e2c4c74263c
2023-09-08 09:44:00 -04:00
Liz Kammer
65942c8467 Do not convert java libraries with core_platform
Test: go bp2build tests
Change-Id: I2769c0d589c304caeb24a8ecba38a4a5ee6c63e5
2023-09-08 09:43:57 -04:00
Treehugger Robot
040d3deedb Merge "android_app APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE" into main am: 8763530dff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2718294

Change-Id: I4d70528e0eda3cdf229c64ddb8cc99eb119015d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 17:20:02 +00:00
Cole Faust
70f839fe01 Merge "Revert^2 "Only allow setting presigned without preprocessed on targetSdk < 30"" into main am: 1b365e350a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2744898

Change-Id: I6472d8ab1c2fbc221f04f6c63cb6be77d38688fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 17:19:06 +00:00
Treehugger Robot
8763530dff Merge "android_app APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE" into main 2023-09-07 16:55:45 +00:00
Cole Faust
1b365e350a Merge "Revert^2 "Only allow setting presigned without preprocessed on targetSdk < 30"" into main 2023-09-07 16:42:08 +00:00
Treehugger Robot
f7fc893c2a Merge "Modify static lib stub library visiblity" into main am: 968c735108
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2744913

Change-Id: Idbe5d3ee533ceabb35172a586cd89ae567d16554
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 13:14:13 +00:00
Treehugger Robot
968c735108 Merge "Modify static lib stub library visiblity" into main 2023-09-07 12:07:17 +00:00
Cole Faust
51d7bfd9a1 Revert^2 "Only allow setting presigned without preprocessed on targetSdk < 30"
This reverts commit d293e28f52.

Reason for revert: The underlying issue was fixed in ag/24685010

Change-Id: I06810d37dba37aa12f9a1e14b0749f1e1eb41136
2023-09-07 05:31:32 +00:00
Karl Shaffer
f6182066f9 Merge "Revert "Only allow setting presigned without preprocessed on targetSdk < 30"" into main am: d79c10f71f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2744115

Change-Id: I5c43aac2f67fe33f6a021aafedb1d9222e133147
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-07 02:01:09 +00:00
Jihoon Kang
786df93db0 Modify static lib stub library visiblity
java_sdk_library generates stub java_library module which compiles the
stub generated from either source or txt files, which is toggled based
on the build configuration. The java_api_library/java_library module
that compiles the stubs should not be directly accessible to the modules
outside of the sdk_library module scope, thus modify their visibility as
private.

Test: m nothing
Bug: 299373105
Change-Id: Ia4a08bf6e65c521814c82f54ea43cc8d367834e3
2023-09-07 01:22:12 +00:00
Karl Shaffer
d79c10f71f Merge "Revert "Only allow setting presigned without preprocessed on targetSdk < 30"" into main 2023-09-07 00:58:24 +00:00
Karl Shaffer
d293e28f52 Revert "Only allow setting presigned without preprocessed on targetSdk < 30"
This reverts commit 6158528e15.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_udc-d1-dev-plus-aosp&target=aosp_bramble-trunk_staging-userdebug&lkgb=10771573&lkbb=10771600&fkbb=10771587, bug https://buganizer.corp.google.com/issues/299369971

BUG: 299369971

Change-Id: I6bf6eb5c0fb9e30197e145121adc7ed58871526f
2023-09-07 00:51:09 +00:00
Cole Faust
41c46414f2 Merge "Only allow setting presigned without preprocessed on targetSdk < 30" into main am: 2f681324c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2659055

Change-Id: I8e784838bc6316f23b0b99554496e3692ecdcc9f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-06 22:04:41 +00:00
Cole Faust
2f681324c2 Merge "Only allow setting presigned without preprocessed on targetSdk < 30" into main 2023-09-06 21:00:15 +00:00
Sam Delmerico
0e0d96efa7 android_app APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE
Currently the product variable that is controlled by
APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE only overrides apexes, but it
doesn't apply to android_apps. This commit allows android_apps which set
updatable: true in their Android.bp to have their min_sdk_version be
overriden by this product variable.

Bug: 295311875
Test: go test
Change-Id: If3cb82a17cae4553b577dd1a4637ee13c3c95302
2023-09-05 21:38:16 +00:00
Romain Jobredeaux
2e5deb49d6 Merge "Bp2build support for app R8-related fields" into main am: 765beb237a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2731698

Change-Id: Ic994371446dade12d9bdc9e1169cb87f07506e45
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-31 20:20:21 +00:00
Romain Jobredeaux
765beb237a Merge "Bp2build support for app R8-related fields" into main 2023-08-31 18:54:49 +00:00
Treehugger Robot
d148e1f232 Merge "Remove unnecessary options when generating stubs from signatures" into main am: c09e38de00
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2709427

Change-Id: Ib5c271a64158a889d910220fb8cbacbe33c0e0b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-31 10:38:44 +00:00
Treehugger Robot
c09e38de00 Merge "Remove unnecessary options when generating stubs from signatures" into main 2023-08-31 09:45:30 +00:00
Paul Duffin
336b16a325 Remove unnecessary options when generating stubs from signatures
These options are unnecessary because:
* `--format` and `--api-overloaded-method-order` only affects the
  generation of signature files which this does not do.

Also changed the build rule description to differentiate from the
usual metalava command to make it easier to find in the ninja file.

Bug: 296115567
Test: m --build-from-text-stub
Change-Id: I7986cba00c364282ddc436d2e69bfb66eda46436
2023-08-31 08:07:26 +01:00
Romain Jobredeaux
9973ace1c7 Bp2build support for app R8-related fields
Bug: 293304784
Test: CI
Change-Id: I0aefa57f968cb41e50d7c1d29b2d8a1480655355
2023-08-31 01:35:44 -04:00
Liz Kammer
47059ae7ab Merge "Add do not convert for sdk_version unset" into main am: f236cd9247
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2698553

Change-Id: Id475ee06602fad0be99217035cc97231329ad3db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 17:34:51 +00:00
Liz Kammer
f236cd9247 Merge "Add do not convert for sdk_version unset" into main 2023-08-30 16:59:50 +00:00
Jared Duke
9facd0d400 Merge "Reland "Enable R8 full mode by default for apps"" into main am: 2860cf1bc8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2731593

Change-Id: Icf8c60397c7ae58f7a9d6d2ab06119a322914479
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-30 16:48:07 +00:00
Jared Duke
2860cf1bc8 Merge "Reland "Enable R8 full mode by default for apps"" into main 2023-08-30 16:03:18 +00:00
Liz Kammer
02914408de Add do not convert for sdk_version unset
When sdk_version is unset, the build with fail with Bazel because
private APIs are do not build with Bazel at this time.

This instead prevents migrating the relevant target to Bazel in bp2build

Test: go tests
Change-Id: I31dabcf143de7933706d1b734ef21467a01b65e9
2023-08-29 20:06:48 -04:00
Cole Faust
6158528e15 Only allow setting presigned without preprocessed on targetSdk < 30
When targetSdk is >= 30, the system verifies that you use a valid
signature V2+ certificate. Uncompressing ndk/dex files or aligning
the zip file will break a signature V2, so these apks should really
just set preprocessed: true.

Fixes: 185811447
Test: Presubmits
Change-Id: Id89c42bcd5b5daa6eda1716bff4023423298036b
2023-08-29 11:18:44 -07:00
Jared Duke
aa88b3d020 Reland "Enable R8 full mode by default for apps"
This is attempt 4 at landing this change. Prior attempts were
reverted due to downstream test breakages not in presubmit.
Those issues have been resolved, and additional manual heavy
presubmit tests were run to ensure stability.

Observed APK savings: ~24MB

This reverts commit 74a5c2ec76.

Reason for revert: Fixed ManagedProvisioningTests

Bug: 215530220
Change-Id: I223228a345fa1a3bad52fb3e91c744107e04fc07
2023-08-29 17:07:20 +00:00
Todd Lee
f09f5d7995 Merge "Support for incremetal platform prebuilt APIs" into main am: 5b6d1d87d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2726799

Change-Id: I8f17b42119655787ba6f17868a3006b3e96d37ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 19:16:31 +00:00
Todd Lee
5b6d1d87d6 Merge "Support for incremetal platform prebuilt APIs" into main 2023-08-28 18:42:58 +00:00
Treehugger Robot
3f352577f8 Merge changes from topic "java-proto-include-dir" into main am: 7eb6ffc796
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2723480

Change-Id: I6c7c4dbed074f32a3b50a2e5adb670f154bc818a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 17:54:41 +00:00
Treehugger Robot
7eb6ffc796 Merge changes from topic "java-proto-include-dir" into main
* changes:
  Handle proto.include_dirs for java
  Translate python_libray.pkg_path to proto.import_prefix
2023-08-28 17:18:29 +00:00
Alix Espino
6af68b8270 Merge "support for multiple filegroups and resource_dirs" into main am: 5dbb696c53
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2626338

Change-Id: I8c3500b085c3443d0a93d3f3f8c130baefa64923
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 17:12:08 +00:00
Alix Espino
5dbb696c53 Merge "support for multiple filegroups and resource_dirs" into main 2023-08-28 17:10:13 +00:00
Treehugger Robot
82c3fafd8f Merge "Add aconfig annotations for java_aconfig_library" into main am: 01f70e8d0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2682307

Change-Id: I1438c67f334f38cc17c75ea9cc08cddab5496171
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 13:41:38 +00:00
Treehugger Robot
01f70e8d0e Merge "Add aconfig annotations for java_aconfig_library" into main 2023-08-28 13:03:56 +00:00
Ian Zerny
2d8d538c2b Merge "Translate SDK level 10000 to a valid compiler min-api" into main am: f94c8113a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2727794

Change-Id: I62732250881d9bb8f1922c7afe8b93cab70559e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-28 07:23:06 +00:00
Ian Zerny
f94c8113a3 Merge "Translate SDK level 10000 to a valid compiler min-api" into main 2023-08-28 06:26:36 +00:00
Joe Onorato
8f75585b37 Add aconfig annotations for java_aconfig_library
Test: m
Bug: 289087078
Change-Id: I860b91f984b2f2c596360490337fb25a4df7a988
2023-08-26 08:26:18 -07:00
Todd Lee
2ec7e1c55c Support for incremetal platform prebuilt APIs
This change provides support for prebuilt incremental platform API (i.e.
API changes associated with a QPR, as opposed to a major dessert
releas).

This feature is provided via the existing prebuilt_apis module with the
introduction of a new attribute:

    allow_incremental_platform_api

While typical platform prebuilt APIs are presumed to be under a
directory structure that follows the pattern:

<version>/<scope>/<module>.jar
<version>/<scope>/api/<module>.txt

Where <version> is limited to a single integer signifying the API level.

For modules where allow_incremental_platform_api is set to 'true' (false
by default) the pattern is the same, however <version> is presumed to be
of the form MM.m, where MM aligns with the existing API level and m
signifies the incremental release (e.g. QPR).

Bug: b/280790094
Test: platform build check with both incremental & non-incremental API
      cd build/soong && go test ./java
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:eee6995093485497bc29cdce01c2a86765ffb4eb)
Change-Id: I67e293006ccfa210d0dcc0a294db894632f1b6cb
2023-08-25 18:03:44 +00:00
Alix
289e9c607b support for multiple filegroups and resource_dirs
Test: tests in bp2build and b build //external/emma:emma

Change-Id: I57e60389aec926c55d01818a6a3b1ec33e9c53b8
2023-08-25 16:12:15 +00:00
Ian Zerny
c26029b473 Translate SDK level 10000 to a valid compiler min-api
Targets with the special level 10000 are compiled using the current
platform SDK level. They are also compiled as a "platform build" which
will disable features such as API modeling and method backports.

Bug: 295591477
Test: manual inspection of the updated build commands
Change-Id: Ifda8859396b33dde4c46a9b212ddb855b012bf07
2023-08-25 13:48:21 +02:00
Spandan Das
e8a90c57e0 Handle proto.include_dirs for java
The proto_library(s) created for include_dirs will be added to
transitive_deps

This also fixes an existing bug for java_library containing .protos in
srcs via filegroups.
```
java_library {
  name: "foo",
  srcs: ["foo.proto", "foo_filegroup"],
}
```

At ToT, foo_filegroup was missing from the equivalent proto_library in
bp2build workspace.

Bug: 285140726
Test: allowlisted pandora-proto-java and built that
Change-Id: I2657d8cdef2e47434bc3e0d09a074c8e27299afc
2023-08-24 19:21:10 +00:00
Mark White
6aac22ac49 Merge "java_library support for building headers-only" into main am: 03fe33ad1c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2721996

Change-Id: Iadd049c8516dc54027e897c23f9d0d2ea3135e96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-23 15:24:18 +00:00
Mark White
03fe33ad1c Merge "java_library support for building headers-only" into main 2023-08-23 15:03:21 +00:00
Mark White
a15790ac1e java_library support for building headers-only
Flag for java_library modules to build just the Turbine headers and
skip building an impl jar.

Test: go test java
Bug: 289776578
Change-Id: Iad0babf951710476bc32df93c25d17065a14ab84
2023-08-22 21:29:05 +00:00
Treehugger Robot
a8a24d90dc Merge changes from topic "aconfig_framework_circle" into main am: a9dbd27afa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2717352

Change-Id: Ie41f1a066b9d164047d61a50375a9981c95e4463
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-21 17:09:16 +00:00