Commit Graph

22854 Commits

Author SHA1 Message Date
Ulyana Trafimovich
7e59e8e2df Merge "Revert "Rename DexJar interface method to DexJarBuildPath."" am: c55b679e7b am: 651a63ca9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1324371

Change-Id: Ic3be6718aff2b04048bac17635b2858581fe7f8a
2020-06-04 11:13:23 +00:00
Ulyana Trafimovich
651a63ca9d Merge "Revert "Rename DexJar interface method to DexJarBuildPath."" am: c55b679e7b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1324371

Change-Id: Ia2202f5363faa713d6ad21e529f66c25d40029c9
2020-06-04 11:02:49 +00:00
Ulyana Trafimovich
c55b679e7b Merge "Revert "Rename DexJar interface method to DexJarBuildPath."" 2020-06-04 10:47:47 +00:00
Ulyana Trafimovich
b0dc851ff4 Revert "Rename DexJar interface method to DexJarBuildPath."
This reverts commit 562c240185.

Reason for revert: breaks `lunch full-eng && m checkbuild`.

Change-Id: Id7c7d6240d98afaf8edd49b6c96cd05534b784cc
2020-06-04 10:37:36 +00:00
Ulyana Trafimovich
0cc337d35a Merge "Rename DexJar interface method to DexJarBuildPath." am: 2a08566634 am: 22cd1b5383
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1322701

Change-Id: I87a6570cc6184bb38dda1f83dac787c30d8aaa54
2020-06-04 10:36:28 +00:00
Ulyana Trafimovich
22cd1b5383 Merge "Rename DexJar interface method to DexJarBuildPath." am: 2a08566634
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1322701

Change-Id: I78f0f186eeb3e4a2014c9cd18dc06185f7a29974
2020-06-04 10:16:15 +00:00
Ulyana Trafimovich
2a08566634 Merge "Rename DexJar interface method to DexJarBuildPath." 2020-06-04 10:05:33 +00:00
Ulyana Trafimovich
317cc83ebb Merge "Error on suboptimal system server classpath order, unless explicitly allowed." am: eb3f9f1295 am: 515534ed9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1322708

Change-Id: Id4849079a3d7b15d861b24a98761fe2a9b6ccd94
2020-06-04 09:20:58 +00:00
Ulyana Trafimovich
515534ed9d Merge "Error on suboptimal system server classpath order, unless explicitly allowed." am: eb3f9f1295
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1322708

Change-Id: I06cbcb2620db54f047abf7661387685785de584b
2020-06-04 09:04:19 +00:00
Ulyana Trafimovich
eb3f9f1295 Merge "Error on suboptimal system server classpath order, unless explicitly allowed." 2020-06-04 08:56:04 +00:00
Treehugger Robot
a7f51bb3c0 Merge "dex_import can be added to apex" am: a8bf98852a am: 55110941ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1320920

Change-Id: I09342ecaf016ca85ab5ac5812c46af6932179258
2020-06-04 05:38:13 +00:00
Treehugger Robot
55110941ea Merge "dex_import can be added to apex" am: a8bf98852a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1320920

Change-Id: I53fd8b961fba5ec095387d3d45ff450823b9ee73
2020-06-04 05:20:39 +00:00
Treehugger Robot
a8bf98852a Merge "dex_import can be added to apex" 2020-06-04 05:06:22 +00:00
Tej Singh
7fbc603f89 [automerger skipped] Revert "Always run package check" am: 8383972ec0 -s ours
am skip reason: Change-Id I50af71d54d5f1f8b516bfcf1efbcf6217e89c83a with SHA-1 b549b77120 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11722213

Change-Id: Ic8e6eb20954c895c96ceaba09d92f6e83665438a
2020-06-03 22:41:27 +00:00
Tej Singh
8383972ec0 Revert "Always run package check"
This reverts commit aa7359ab0c.

Reason for revert: package-check.sh doesn't work on mac

Change-Id: Ia3dcee612c1f6b4121e1351c8710638ae41bc88a
Merged-In: I50af71d54d5f1f8b516bfcf1efbcf6217e89c83a
2020-06-03 18:45:54 +00:00
Colin Cross
d89338653f Merge "Revert "Always run package check"" am: 3747336d23 am: 2f0963ecd3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1323293

Change-Id: I3592365b63fab1597b2a41aafaa68e49d6f1e0f2
2020-06-03 17:56:14 +00:00
Colin Cross
2f0963ecd3 Merge "Revert "Always run package check"" am: 3747336d23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1323293

Change-Id: I4c17b88a3e2cd6d089ed2f8ea9e2592b9713ad1c
2020-06-03 17:31:13 +00:00
Colin Cross
3747336d23 Merge "Revert "Always run package check"" 2020-06-03 17:15:51 +00:00
Colin Cross
b549b77120 Revert "Always run package check"
This reverts commit 91206d9ed1.

Reason for revert: package-check.sh doesn't work on mac
Bug: 158081251
Bug: 157649935
Change-Id: I50af71d54d5f1f8b516bfcf1efbcf6217e89c83a
2020-06-03 17:15:15 +00:00
Ulya Trafimovich
cd3203fd5d Error on suboptimal system server classpath order, unless explicitly allowed.
The order is non-optimal if some jar X precedes its dependency Y. In
that case dexpreopt will be unable to resolve any rerefences from X to
Y. Raise an error unless the product sets variable
PRODUCT_BROKEN_SUBOPTIMAL_ORDER_OF_SYSTEM_SERVER_JARS to true in the
makefile. This is to prevent regressions in existing products that
currently have correct order.

Test: lunch cf_x86_phone-userdebug && m nothing
Test: lunch aosp_car_arm && m nothing

Bug: 140451054

Change-Id: Iafe8fe0e992deb628e38f2321d4601a4804a3c79
Merged-In: Iafe8fe0e992deb628e38f2321d4601a4804a3c79
(cherry picked from commit fb863c87c4)
2020-06-03 17:37:34 +01:00
Ulya Trafimovich
562c240185 Rename DexJar interface method to DexJarBuildPath.
This is a prerequisite change before adding DexJarInstallPath.

Test: lunch aosp_cf_phone-userdebug && m
Change-Id: I033e08b8bb06c0a844a6bbbfcdc48ce33e9c95cf
2020-06-03 11:40:45 +01:00
Orion Hodson
942feab5f1 [automerger skipped] Merge "Add some app modules to the allowed whitelist." am: 4a19d08d39 am: 46b02790a6 -s ours
am skip reason: Change-Id Ia7adf690cd6dca1408ae0a340860eaeae6c1d4b4 with SHA-1 555760552b is in history

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1290961

Change-Id: I49475cdb9416b0fc5fc4d508bd205fd641bbe199
2020-06-03 08:08:06 +00:00
Orion Hodson
46b02790a6 Merge "Add some app modules to the allowed whitelist." am: 4a19d08d39
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1290961

Change-Id: I3823854f5782ced6c19ceb3eeb3df03ea117f17f
2020-06-03 07:55:27 +00:00
Orion Hodson
4a19d08d39 Merge "Add some app modules to the allowed whitelist." 2020-06-03 07:29:51 +00:00
Paul Duffin
1c1ae70a9b [automerger skipped] Always run package check am: aa7359ab0c -s ours
am skip reason: Change-Id Ib01aa09e13f80282218049270eb7a58ec5f9f605 with SHA-1 91206d9ed1 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/11705585

Change-Id: Ie637265dc7522c8472348e681aebf53575ab1662
2020-06-03 00:51:54 +00:00
Jaewoong Jung
8066ebc38f Merge "Soong package structure refactoring" am: 264700345d am: ca9ed9158d
Original change: undetermined

Change-Id: I5cd95c02ab8af420dc2b7166ba24bdf0c7dc6496
2020-06-02 16:57:16 +00:00
Jaewoong Jung
ca9ed9158d Merge "Soong package structure refactoring" am: 264700345d
Original change: undetermined

Change-Id: I2b482006094cf5f2a5037177f78edf649386f78b
2020-06-02 16:45:48 +00:00
Jaewoong Jung
264700345d Merge "Soong package structure refactoring" 2020-06-02 16:30:50 +00:00
Treehugger Robot
68e90ef846 Merge "Copy removed.txt file to the snapshot correctly" am: b47ab4b79f am: 8fc769dd85
Original change: undetermined

Change-Id: I5846b5bd6c7c470d4732d49a90ff800b35975e7b
2020-06-02 16:09:42 +00:00
Treehugger Robot
8fc769dd85 Merge "Copy removed.txt file to the snapshot correctly" am: b47ab4b79f
Original change: undetermined

Change-Id: If04cb2450ee42cfe97dfab3511726ceb6c397c89
2020-06-02 15:52:09 +00:00
Treehugger Robot
b47ab4b79f Merge "Copy removed.txt file to the snapshot correctly" 2020-06-02 15:36:39 +00:00
Ulyana Trafimovich
12d342de36 Merge "Clean up class loader context generation." am: 5af1e93993 am: 5282305767
Original change: undetermined

Change-Id: Ide3cc6912373d4b39dcd029731b3f30855c8a8bc
2020-06-02 14:46:19 +00:00
Ulyana Trafimovich
5282305767 Merge "Clean up class loader context generation." am: 5af1e93993
Original change: undetermined

Change-Id: Id56144f63a8f1400b20190aca44cc67b736d64c7
2020-06-02 14:23:02 +00:00
Ulyana Trafimovich
5af1e93993 Merge "Clean up class loader context generation." 2020-06-02 14:13:43 +00:00
Paul Duffin
3dbf9fd892 Copy removed.txt file to the snapshot correctly
Previously, the code copied the current.txt file to both the
current_api and removed_api properties. This change copies the
removed.txt file to the removed_api property instead.

Bug: 157980685
Test: m nothing
Change-Id: Iad34e91051da43222d22c240c16f50887c43d73e
2020-06-02 14:40:28 +01:00
Paul Duffin
56e303ae4e Always run package check am: 91206d9ed1 am: d08b1040cb
Original change: undetermined

Change-Id: I7eed39d6b49b0e837c8ad0689a8e728f7b329e41
2020-06-02 13:31:18 +00:00
Paul Duffin
d08b1040cb Always run package check am: 91206d9ed1
Original change: undetermined

Change-Id: I0adc92199f39a0f94b377fba89faa30cd8af43d7
2020-06-02 13:16:35 +00:00
Paul Duffin
aa7359ab0c Always run package check
Previously, the package check was only run when building checkbuild or
the phony target created for a specific module. It would not run when
building a module that depended upon a library with the
permitted_packages property. That was because the package check was
only run when the package-check.stamp file was built and that was only
added to the phony and checkbuild targets.

Instead of touching a separate package-check.stamp file to indicate
that the check has been performed this change copies the input jar file
to the package check to a separate ../package-check/<jar> file which is
then treated as the output of the library and is the input for any dex
processing. So, any modules that depend on this library will
transitively depend on the output file produced by the package check
command and so will ensure that the package check is always run.

Test: Removed "android.net" from the permitted_packages for
      "framework-tethering", build "framework-tethering" which
      triggered and failed the package check and
      "com.android.tethering" which did not.
      Made this change.
      Built "com.android.tethering" which triggered and then failed the
      package check.
      Removed change to "framework-tethering"
Bug: 157649935
Merged-In: Ib01aa09e13f80282218049270eb7a58ec5f9f605
Change-Id: Ib01aa09e13f80282218049270eb7a58ec5f9f605
(cherry picked from commit 91206d9ed1)
2020-06-02 14:05:34 +01:00
Paul Duffin
91206d9ed1 Always run package check
Previously, the package check was only run when building checkbuild or
the phony target created for a specific module. It would not run when
building a module that depended upon a library with the
permitted_packages property. That was because the package check was
only run when the package-check.stamp file was built and that was only
added to the phony and checkbuild targets.

Instead of touching a separate package-check.stamp file to indicate
that the check has been performed this change copies the input jar file
to the package check to a separate ../package-check/<jar> file which is
then treated as the output of the library and is the input for any dex
processing. So, any modules that depend on this library will
transitively depend on the output file produced by the package check
command and so will ensure that the package check is always run.

Test: Removed "android.net" from the permitted_packages for
      "framework-tethering", build "framework-tethering" which
      triggered and failed the package check and
      "com.android.tethering" which did not.
      Made this change.
      Built "com.android.tethering" which triggered and then failed the
      package check.
      Removed change to "framework-tethering"
Bug: 157649935
Change-Id: Ib01aa09e13f80282218049270eb7a58ec5f9f605
2020-06-02 10:29:47 +01:00
Jiyong Park
77acec63fe dex_import can be added to apex
Bug:157886942
Test: m
Change-Id: Ida6f7bb784efe74cc1fa0e8d370eaee803f08b0f
2020-06-02 11:54:01 +09:00
Treehugger Robot
804dd8142c Merge "Upload build metrics after a build is completed." am: 039b04f4fc am: dedcd7a8cc
Original change: undetermined

Change-Id: I36e238781e2d387eec58dfbbd39256380d754935
2020-06-01 21:48:22 +00:00
Treehugger Robot
dedcd7a8cc Merge "Upload build metrics after a build is completed." am: 039b04f4fc
Change-Id: Ic2176b9549d1b027650f466072d1910ab9373b11
2020-06-01 21:05:50 +00:00
Treehugger Robot
039b04f4fc Merge "Upload build metrics after a build is completed." 2020-06-01 20:44:54 +00:00
Jaewoong Jung
4b79e98a6e Soong package structure refactoring
Give prebuilt_etc and sh_binary their own packages and split the
gigantic main Android.bp up to small, per-package ones.

Test: m nothing, TreeHugger
Bug: 156980228
Change-Id: I7b00cd344b9f16861f1ff39edf0029f016b853d0
2020-06-01 13:44:48 -07:00
Patrice Arruda
219eef3878 Upload build metrics after a build is completed.
Soong now supports the ability to upload metrics to another location
by setting the ANDROID_ENABLE_METRICS_UPLOAD to an uploader that
accepts the upload.proto proto buffer message. When the environment
variable is set, a set of build metrics files (soong_metrics,
rbe_metrics.pb and build_error) is uploaded.

Bug: 140638454
Test: * Wrote unit test cases
      * Setup the uploader, built a succcessful and failed aosp_arm-eng
        target and monitor the uploading of the metrics.
Change-Id: I76a65739c557dc90345e098ca03119a950ece2d2
2020-06-01 17:29:30 +00:00
Treehugger Robot
a034aecb73 Merge "Improved formatting of a module list in a panic message." am: a91b64d3ee am: 31771f8f14
Change-Id: I5a7fdb194011300b86a42f8dd8b8dfcf95e6d3d3
2020-06-01 16:58:01 +00:00
Ulya Trafimovich
696c59dbfa Clean up class loader context generation.
Deduplicate code for conditional class loader contexts that depend
on the target SDK version in the manifest.

Test: lunch aosp_cf_phone-userdebug && m
Change-Id: I69d51b212bf502b2659d43f124ea3922f90e1881
2020-06-01 17:55:56 +01:00
Treehugger Robot
31771f8f14 Merge "Improved formatting of a module list in a panic message." am: a91b64d3ee
Change-Id: I10a306bd9bd966d10814e8a220aa47e081daeb10
2020-06-01 16:32:51 +00:00
Treehugger Robot
a91b64d3ee Merge "Improved formatting of a module list in a panic message." 2020-06-01 16:20:50 +00:00
Ulyana Trafimovich
a5b0450554 Merge "Add android.test.base to class loader context for API version < 30." am: ad02d401ab am: 6200c519e2
Change-Id: I998889df1bd34e7bb15df3cd5791cb5f70d7d0ae
2020-06-01 15:29:22 +00:00