Commit Graph

3586 Commits

Author SHA1 Message Date
Bob Badour
a163fe55f9 Merge changes from topic "revert-1377717-metalics-BOEMJWNSHV" am: a1b87c81ca am: 72b5c0288a am: 15ef54bab8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541852

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I917681ef203a9974b958ef1086f4e8e161cb7baa
2021-01-06 20:22:46 +00:00
Bob Badour
15ef54bab8 Merge changes from topic "revert-1377717-metalics-BOEMJWNSHV" am: a1b87c81ca am: 72b5c0288a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541852

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie75ae43eb4e19104a2d7702819de6ab57a97bf5b
2021-01-06 20:01:12 +00:00
Bob Badour
5293a09d57 Export soong license data to make. am: 74fab31712 am: de77ecd56b am: 0b061c969c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1454916

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6decb1f33ea120a79a8de2c5b26dd4d87db627d3
2021-01-06 19:54:08 +00:00
Bob Badour
a1b87c81ca Merge changes from topic "revert-1377717-metalics-BOEMJWNSHV"
* changes:
  Revert "Add ability to declare licenses in soong."
  Revert "Export soong license data to make."
  Revert "Define the standard license_kind rules."
2021-01-06 19:17:45 +00:00
Bob Badour
0b061c969c Export soong license data to make. am: 74fab31712 am: de77ecd56b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1454916

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1d9075f4d60f9c94b18345cb67e800f10af1e338
2021-01-06 19:12:13 +00:00
Jerome Gaillard
61a55a0344 Revert "Export soong license data to make."
Revert submission 1377717-metalics

Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442

Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.

Change-Id: I51799c94a274eadab414abd80a07b5cda4584be9
2021-01-06 19:00:05 +00:00
Bob Badour
de77ecd56b Export soong license data to make. am: 74fab31712
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1454916

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ied2ab6fb4455326b4e0f1f58fba8d637a2a8f3c9
2021-01-06 18:42:30 +00:00
Bob Badour
659f11fcfc Merge changes from topic "metalics"
* changes:
  Define the standard license_kind rules.
  Export soong license data to make.
  Add ability to declare licenses in soong.
2021-01-06 18:08:07 +00:00
TreeHugger Robot
c154901324 Merge "Revert "Enforce <uses-library> checks for android_app and android_app_import."" into rvc-qpr-dev-plus-aosp am: f1f47a341b
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/13287340

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I809e76224b019edf346b335f9ef8814592002308
2021-01-06 17:15:03 +00:00
Ulyana Trafimovich
c2b6b65d73 Revert "Enforce <uses-library> checks for android_app and android_app_import."
This reverts commit 22890c466e.

Reason for revert: Broken build 7065627 on git_rvc-qpr-dev-plus-aosp
  on aosp_sunfish-userdebug branch.

Bug: 176892941
Test: treehugger
Change-Id: I0f5da13644fd2ec7b0472fe82918e3c6a72d953c
2021-01-06 15:30:09 +00:00
Ulyana Trafimovich
dd1807bb60 Merge "Enforce <uses-library> checks for android_app and android_app_import." am: 0a984f559f am: 5e5db14cc3 am: 35efc7221d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1535007

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I071cc685c59e5c58f9efd3fbfbc42900056cb4f4
2021-01-06 14:32:51 +00:00
Bob Badour
74fab31712 Export soong license data to make.
See: http://go/android-license-checking-in-soong-v2-design

Bug: 151953481
Bug: 151177513
Bug: 67772237

Change-Id: If9d661dfcaa732c459d38d8ad7ec4a0e540846b8
2021-01-05 08:42:48 -08:00
Ulya Trafimovich
22890c466e Enforce <uses-library> checks for android_app and android_app_import.
Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: Ib9653aa27a173f0f0c03c7c9b0963d8ea71bb155
2021-01-05 12:04:17 +00:00
Anton Hansson
2729ae87c5 Remove Ignore_missing_latest_api am: e6056153cf am: a14b27e1f6 am: 6d906c4f39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538883

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1e07de0a6dae26d377fb93cd4778cd50aeeafda1
2021-01-05 10:54:36 +00:00
Anton Hansson
e6056153cf Remove Ignore_missing_latest_api
This flag was only used by sdk_library.go, and is no longer needed
since sdk_library.go now knows which libraries are missing latest_api
tracking files.

Bug: 176092454
Test: m
Change-Id: I5a967f784bde99f103b85654c794e8d7110fd0db
2020-12-31 10:44:38 +00:00
Anton Hansson
ea74599a08 Merge "Stop allowing missing last-api files by default" am: 591920fcfa am: 55677bc46b am: f6e4184684
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534347

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c763c877ad92b57fd2a6408f9d64f4aa5b9f1ef
2020-12-31 09:58:02 +00:00
Anton Hansson
9790c37691 Merge "Set previous_api correctly for java_sdk_library" am: 6b8c40036c am: a3804d57a2 am: 003604862b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534348

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0237942bb160abd3a2711fc661be9a951b6593fc
2020-12-31 09:57:52 +00:00
Anton Hansson
591920fcfa Merge "Stop allowing missing last-api files by default" 2020-12-31 08:53:45 +00:00
Anton Hansson
e87b03d1bb Set previous_api correctly for java_sdk_library
Metalava used this attribute to potentially re-write some nullness
annotations from @Nullable to @RecentlyNonNull, and not doing so can
cause problems when compiling kotlin.

Bug: 176092452
Test: m art.module.public.api.stubs && \
      rm -rf /tmp/lib && \
      unzip -qd /tmp/lib art.module.public.api.stubs.jar && \
      javap -v /tmp/lib/java/util/concurrent/ConcurrentHashMap.class | \
      grep Recently
Change-Id: I9012798f27e39d9a53dbcf0976548f6cec2d3150
2020-12-29 13:24:02 +00:00
Anton Hansson
0615864046 Stop allowing missing last-api files by default
Bug: 176092454
Test: m nothing
Change-Id: I9eadcb774e9898bb4f43054661826326b2c527c2
2020-12-29 13:20:42 +00:00
Jaewoong Jung
a375fe863a Merge "Break up app.go." am: 8bfb63c5a9 am: 1863d9abf8 am: 9aded01f3a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533144

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3fee391a2dcb19cffea855b44de33a9ecb329a26
2020-12-28 19:11:58 +00:00
Bill Peckham
64c2f473d9 Merge "Automatically set uncompress_dex for java_import." am: 3d419e3b3d am: 3f63ee855d am: f97a71309e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1536102

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I469451e1d992b1a2eab86a55dc65638fc9c3485f
2020-12-28 18:19:17 +00:00
Jaewoong Jung
8bfb63c5a9 Merge "Break up app.go." 2020-12-28 17:50:44 +00:00
Bill Peckham
3d419e3b3d Merge "Automatically set uncompress_dex for java_import." 2020-12-28 17:20:14 +00:00
Treehugger Robot
770149b347 Merge "Use soong_zip -srcjar for proto and aidl srcjars" am: b2d77d4a52 am: edeeabc7e0 am: 1df71d3d13
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1535580

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I139f9a33e0cf7a54448fb9c59183df37e3901ee8
2020-12-24 03:58:21 +00:00
Treehugger Robot
b2d77d4a52 Merge "Use soong_zip -srcjar for proto and aidl srcjars" 2020-12-24 03:04:37 +00:00
Colin Cross
cf02ec8747 Use soong_zip -srcjar for proto and aidl srcjars
IntelliJ's indexer is unhappy with the full paths in the proto
and aidl srcjars.  Use the -srcjar argument to soong_zip, which
causes it to extract the correct filename for .java files based on
the package statement in the file.

Bug: 176209347
Test: manual
Change-Id: I63d9d4f6ba670e3b851835d719519d675ae54c7f
2020-12-23 17:13:16 -08:00
Bill Peckham
ff89ffae0b Automatically set uncompress_dex for java_import.
Setting uncompress_dex for java_import in the same way
as java_library enables using a java_import as an art
jar or a boot jar.

Bug: 175619567
Test: m nothing
Test: TestHiddenAPISingletonWithPrebuilt
Change-Id: I0b552a11d1630a014cf978520ccc5977fdf74066
2020-12-23 16:13:04 -08:00
Treehugger Robot
fc84e8b4d7 Merge "Fix library order in class loader context to agree with PackageManager." am: 7dbc5786e3 am: 13b56f815f am: 49977f12c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1535013

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I38389beaad89ec6177e4f9eedba3585ad9e8ae59
2020-12-23 21:17:19 +00:00
Treehugger Robot
7dbc5786e3 Merge "Fix library order in class loader context to agree with PackageManager." 2020-12-23 19:58:25 +00:00
Ulya Trafimovich
c9f2b9494d Fix library order in class loader context to agree with PackageManager.
PackageManager adds compatibility libraries for different SDK versions
in descending order, and Soong should do the same.

Bug: 132357300

Test: lunch aosp_cf_x86_phone-userdebug && m \
  && launch_cvd \
  && adb wait-for-device \
  && adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch'

  [no messages "ClassLoaderContext classpath element mismatch"]

Change-Id: Ib1d981808ae4022b2c6e73f407a003e8b8e9c7d6
2020-12-23 18:22:26 +00:00
Anton Hansson
496ea93244 Merge "Add attribute to disable last-api compat tracking" am: 74c8436ce0 am: 325936250d am: de5d8fb877
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534344

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I77051ff3d3608e69284d707cb8353ba530dbc957
2020-12-23 10:19:04 +00:00
Anton Hansson
74c8436ce0 Merge "Add attribute to disable last-api compat tracking" 2020-12-23 09:05:46 +00:00
Jaewoong Jung
de6671062a Merge "Remove unnecessary snake case variables." am: e794b1e302 am: ce131b6fcf am: e3ec6f723e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533880

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2e481c45e9fcc2e0023c03aed89320c49678dc86
2020-12-23 02:15:09 +00:00
Jaewoong Jung
18aefc1977 Remove unnecessary snake case variables.
Test: m nothing + TreeHugger
Change-Id: I99f7162944daa6c57c6ae4763261e108bb5cb6b1
2020-12-22 12:38:35 -08:00
Colin Cross
08e19794be Merge "Add car packages to the legacy allowlist" 2020-12-22 19:09:18 +00:00
Colin Cross
0d39bf14ec Add car packages to the legacy allowlist
Car packages that were defined in Android.mk files need to be
added to the allowlist so they can be converted to Android.bp

Bug: 122333160
Test: m CarServiceTest DiagnosticTools
Change-Id: Ia7613f35c4392eac51c94b0d1da29ecac82eb103
2020-12-22 19:08:54 +00:00
Ulyana Trafimovich
7abbd99ddf Merge changes I6a512209,I56437f26 am: b630c37d61 am: 99d0a65605 am: 04072a75d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533342

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I032bbacddd19131010944a1340205e3244c6957d
2020-12-22 11:51:06 +00:00
Ulyana Trafimovich
b630c37d61 Merge changes I6a512209,I56437f26
* changes:
  Unify addition of class loader subcontext from dependencies.
  Move ClassLoaderContexts() method to UsesLibraryDependency interface.
2020-12-22 10:14:41 +00:00
Ulya Trafimovich
88bb6f6342 Unify addition of class loader subcontext from dependencies.
Previously CLC construction was scattered across different module types
and dependency tags. This CL moves all logic to one function, which
handles all special cases. This will allow to simplify CLC API and
reduce the number of different ways in which CLC is constructed.

Previously some of the cases failed early (at the time when a library is
added to CLC) if the build/install paths were unknown. Other cases did
not fail early, but were validated later before CLC was used. Late
failures are necessary because some of the libraries with unknown paths
still have to be processed by manifest_fixer (which doesn't need library
paths), but they do not use dexpreopt (which needs library paths). This
CL removes the early failures (all paths are still validated later).

The CLC tests do not fail because they use a private method that toggles
the "strict" flag (that enforces early/late failure mode) manually in
the method call.

The CL also makes a functional change in the way CLC is constructed for
component libraries that have an OptionalImplicitSdkLibrary(), or
libraries that are disguised as SDK libraries via `provides_uses_lib`.
Previously such a component/disguised library X was added to its own CLC
as a sibling element of X's own <uses-library> dependencies, which
created incorrect CLC structure. Now this is handled by addCLCFromDep,
when X is processed as dependency and added as a top-level CLC element
with its sub-CLC properly nested under it.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I6a512209b87b81d785875f10f76b21c81b2ed579
2020-12-21 22:16:21 +00:00
Jaewoong Jung
f9b44657c8 Break up app.go.
Test: m nothing + TreeHugger
Change-Id: I64c6d7f10530c424bc282d8111dfaf9159426f00
2020-12-21 12:31:51 -08:00
Anton Hansson
dff2c78a20 Add attribute to disable last-api compat tracking
Setting this to true by default is dangerous as it can mask bugs. Create
a dedicated attribute for java_sdk_library to enable this behavior
instead. The default will be flipped in a future CL when all the current
offenders have been fixed.

Fix all the tests to have the right API files.

Bug: 176092454
Test: m nothing
Change-Id: Ieab94bcb74abf8d018365a56fb447fe3dbd46957
2020-12-21 17:25:30 +00:00
Jaewoong Jung
1e3bf98992 Merge "Remove the return value from dexpreopt" am: 4eb5048585 am: c08ca970c9 am: 3ab305b8f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532723

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic131cf490323f25a2a7cd5b81e574d72903c7492
2020-12-21 17:19:05 +00:00
Jaewoong Jung
4b97a56615 Remove the return value from dexpreopt
dexpreopt doesn't strip dex files from the input jar anymore, so there's
no point returning the input jar path untouched.

Test: m nothing + TreeHugger
Change-Id: I8fde6cdc19e85a2fbc946513696417b945c5de0f
2020-12-17 09:43:28 -08:00
Ulya Trafimovich
dbf31665ab Move ClassLoaderContexts() method to UsesLibraryDependency interface.
This method logically belongs with other UsesLibraryDependency methods,
as it is used in the same context when computing class loader context.
Previously it was part of Dependency interface, which doesn't cover SDK
libraries. We do not currently have the necessary information for
SdkLibraryImport (so ClassLoaderContexts() returns nil for it), but we
do have it for SdkLibrary (via Library).

Bug: 132357300
Test: m nothing
Change-Id: I56437f260efc6a9af3f45b334e84e915244ccce1
2020-12-17 15:05:26 +00:00
Treehugger Robot
5818f23004 Merge "Assert android.ApexModule interface for types having ApexModuleBase" am: 1a74be780b am: 7d3e31bd70 am: bb56da8ed0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1530138

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idc0a30d1747606337cfdfd4ce76495dcf4cadc05
2020-12-17 05:25:14 +00:00
Jiyong Park
45bf82e953 Assert android.ApexModule interface for types having ApexModuleBase
Bug: 173472337
Test: m nothing
Change-Id: Idf1c6cb9fff6c18e34c4636e38a662ba4ff7d538
2020-12-15 14:31:27 +00:00
Treehugger Robot
09d7f251ad Merge "Add dependency to list of asset files" am: 9ae3c52b20 am: d8e90b35dd am: 7d9f8d6137
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1494657

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I83cfab64bcd19accd4266bab030ff016cd63a1f6
2020-12-12 03:34:30 +00:00
Colin Cross
c20dc8533e Add dependency to list of asset files
We had a dependency on each file in the asset directories, but that
wouldn't cause aapt2 to run if a file was removed.  Add a dependency
on a file that contains the list of files in the asset directories.

Fixes: 172867096
Test: m CarrierConfig && rm packages/apps/CarrierConfig/assets/carrier_config_no_sim.xml && m CarrierConfig
Change-Id: I35f3b85355fa890a3e95eaa6458a21466b6930e4
2020-12-11 19:54:16 +00:00
Treehugger Robot
333f9b4c39 Merge "Remove AndroidMkExtraFootersFunc entries param." am: cac133df14 am: 528d2fdc51 am: e1ba585449
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1519314

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I855cb1808bfdf783ae4f16ece7c23bc6bda3f34c
2020-12-10 07:57:46 +00:00