Commit Graph

3327 Commits

Author SHA1 Message Date
Dan Albert
d2a7987456 Replace ApiStrToNum uses with ApiLevel. am: c8060536e8 am: 6e3d089818 am: c81c409966 am: 97825a1e23 am: 049b18bb14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371896

Change-Id: Id26f8d0f0323da9fbf924fcb42dda23d326e2909
2020-09-25 06:00:55 +00:00
Treehugger Robot
4f6eebff0c Merge changes I0885e493,Ic37c8db9
* changes:
  linux_bionic_arm64 is added when Host_bionic_arm64 is true
  HostCross is an attribute of a Target, not OsType
2020-09-24 22:56:43 +00:00
Anton Hansson
b30f593da4 Make API lint warnings errors for system & testapi
They used to be listed to not have this treatment, but we are
baselining the existing warnings and making them errors instead.

Bug: 154317059
Test: m
Change-Id: I306b5a07d1b771cc0061aaac44f881f40fbe85ed
Merged-In: I306b5a07d1b771cc0061aaac44f881f40fbe85ed
2020-09-24 13:51:29 +01:00
Jiyong Park
1613e5541f HostCross is an attribute of a Target, not OsType
A host target is considered as being cross-compiled when the target
can't run natively on the build machine. For example, linux_glibc/x86_64
is a non-cross target on a standard x86/Linux machine, but is a cross
host on Mac. Previously, whether cross or not was a static attribute of
an OsType. For example, Windows was always considered as cross host,
while linux_bionic was not. This becomes a problem when we support more
host targets like linux_bionic/arm64 which should be cross-host on
standard x86/Linux machines.

This change removes HostCross from the OsClass type and instead adds a
property HostCross to the Target type. When a target is being added, it
is initialized to true when the target can't run natively on the current
build machine.

Bug: 168086242
Test: m
Change-Id: Ic37c8db918873ddf324c86b12b5412952b0f2be2
2020-09-24 14:14:31 +09:00
Dan Albert
4f378d75aa Convert more versions in config to ApiLevel.
The test case I removed is invalid. The codename has had its int
assigned, but the config claims it is not final.

If this ever does need to be supported it's just a matter of making
sure the Q -> 29 mapping (or whatever) in the finalized codenames map
in android/api_levels.go.

Test: treehugger
Bug: http://b/154667674
Change-Id: I4f42ec2fd4a37750519ee3937938a1c65b6bb1e8
2020-09-22 16:01:56 -07:00
Dan Albert
0b176c8038 Replace FutureApiLevel with an ApiLevel.
Keeping the int constant around for now as FutureApiLevelInt because
it's still useful in places that haven't adopted ApiLevel yet for
testing if their non-ApiLevel API level is current or not.

Test: treehugger
Bug: http://b/154667674
Change-Id: I47a7012703f41fdeb56f91edf9c83afa93042deb
2020-09-22 15:04:48 -07:00
Dan Albert
c8060536e8 Replace ApiStrToNum uses with ApiLevel.
Test: treehugger
Bug: http://b/154667674
Change-Id: I2954bb21c1cfdeb305f25cfb6c8711c930f6ed50
2020-09-22 15:04:48 -07:00
Treehugger Robot
1f3cf5f29e Merge "Fix proguard_usage.zip with USE_RBE=true RBE_R8=true" am: 5fc50f2936 am: e11d46dbec am: fc9014fd82 am: a91e7bcb5c am: cd4491e820
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1430134

Change-Id: Ifbf30b113ac6b66cb3745131017cd12c65bc9f48
2020-09-22 20:40:25 +00:00
Treehugger Robot
5fc50f2936 Merge "Fix proguard_usage.zip with USE_RBE=true RBE_R8=true" 2020-09-22 17:59:40 +00:00
Treehugger Robot
43e9691814 Merge "Suppress reflection warnings when running metalava" am: 7ede442a9e am: 964421d8ab am: 98842ca7c0 am: 525f65dcce am: 0e98f35df2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433193

Change-Id: I89a7554336d68d3d3b4bd729bb286df3ff372afa
2020-09-22 01:40:40 +00:00
Aurimas Liutikas
4c5efde049 Suppress reflection warnings when running metalava
Intellij PSI/UAST reflects into java.base causing
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.intellij.util.ReflectionUtil (file:/mnt/ssd1/out/master/soong/host/linux-x86/framework/metalava.jar) to method java.util.ResourceBundle.setParent(java.util.ResourceBundle)
WARNING: Please consider reporting this to the maintainers of com.intellij.util.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

Upstream bug https://youtrack.jetbrains.com/issue/IDEA-210683

Bug: 168689341
Test: make checkapi
Change-Id: Ibc8954d83d5962b3cd0ea1bac9a62f6ccfc88c6c
2020-09-21 11:35:10 -07:00
Liz Kammer
fd84d991dc Merge "Make hiddenapi use prebuilt stubs when it should" am: 9d1f85da7a am: 11719185e2 am: 4bc86bdb72 am: f289c2a0ae am: 6fef26413b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1431533

Change-Id: Id8da02afdb4563b654425d3687169ef10da0987d
2020-09-21 17:19:03 +00:00
Anton Hansson
a2adc37fc9 Make hiddenapi use prebuilt stubs when it should
Bug: 160455085
Test: build_unbundled_mainline_module.sh (with disabled source-stubs)
Test: hiddenapi_singleton_test.go
Change-Id: Id93c974351b3f8efdf8e4efe4192d3809f4fcaa5
2020-09-18 08:06:58 -07:00
Colin Cross
e00c0e795d Fix proguard_usage.zip with USE_RBE=true RBE_R8=true
proguard_usage.zip contained an empty unused.txt file when
the unused.txt file wasn't specified as an output of the r8
rule.

Test: m USE_RBE=true RBE_R8=true out/soong/.intermediates/frameworks/base/packages/Shell/Shell/android_common/proguard_usage.zip
Change-Id: Ie6a7c8b2581fe21d643e675143d6cc0e2ce80456
2020-09-17 18:56:43 +00:00
Anton Hansson
7da8a66865 Merge "Make API lint warnings errors for system & testapi" 2020-09-17 10:47:21 +00:00
Treehugger Robot
214052bbcf Merge "Make robolectric runtimes a host module" am: 0fe609075d am: a53a783a13 am: 1a24371349 am: 825733a01e am: 853a7d4f62
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1427453

Change-Id: I55a1ba4b856e98b62ffe026fb2849575f9d2d337
2020-09-17 02:30:30 +00:00
Treehugger Robot
0fe609075d Merge "Make robolectric runtimes a host module" 2020-09-16 23:23:08 +00:00
Anton Hansson
2d4673005d Make API lint warnings errors for system & testapi
They used to be listed to not have this treatment, but we are
baselining the existing warnings and making them errors instead.

Bug: 154317059
Test: m
Change-Id: I306b5a07d1b771cc0061aaac44f881f40fbe85ed
2020-09-16 13:17:12 +01:00
Colin Cross
5aa29a7fc2 Make robolectric runtimes a host module
I931f9145f1ced21a9f86d647cfbb6d2b645b4f18 made robolectric_android-all-stub
empty, breaking running robolectric tests packaged by Soong.
To enable using robolectric-host-android_all instead, make the
runtimes module a host module.

Also remove the empty robolectric_android-all-stub dependency.

Test: m checkbuild
Change-Id: Idc158d84fd8b6d98d824a6bdc8be297ac43ec2f2
2020-09-15 11:26:12 -07:00
Liz Kammer
57415af1ab Merge "Updates checkapi filename properties behavior" am: 6b5430203c am: 0ae6ce2b99 am: 7aa68f1849 am: a88f455e29 am: ac672f52aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1417208

Change-Id: I9b2be533623e05a21eab28f930277a01da1271e0
2020-09-14 22:43:52 +00:00
Liz Kammer
e9b1e91ec3 Merge "Add hidden_api for java_import" am: 88d593d942 am: 00daa76535 am: 5fb368c484 am: eb0e1f2561 am: 52664dac4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1418668

Change-Id: Id4a9a2a1db9da201a3a29024e132ac6aeef3fba2
2020-09-14 22:43:19 +00:00
Ulyana Trafimovich
118b445c67 Merge changes from topic "uses-libs-21" am: 2fc25bbd4c am: de2b311e0c am: c366bdea5a am: a0f87740a9 am: 10c3b84113
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1424793

Change-Id: Iaa26b9db6965a22f3381d96f95c98ac9dafaa866
2020-09-14 19:41:06 +00:00
Liz Kammer
6b5430203c Merge "Updates checkapi filename properties behavior" 2020-09-14 17:55:17 +00:00
Liz Kammer
88d593d942 Merge "Add hidden_api for java_import" 2020-09-14 13:57:09 +00:00
Ulyana Trafimovich
2fc25bbd4c Merge changes from topic "uses-libs-21"
* changes:
  Treat "org.apache.http.legacy" as optional <uses-library> by default.
  Consistently use default install path for compatibility <uses-library>.
2020-09-14 09:18:39 +00:00
Treehugger Robot
3d7e0993fb Merge "Remove framework-modules naming scheme" am: 570b81ab01 am: 280f17c4be am: 18bb8a92e5 am: 291c5e2b59 am: f66eb0d277
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1425729

Change-Id: I0fc78f96c8b2991e0ba4a1e8ae5c6b2f0e1816a3
2020-09-12 00:14:07 +00:00
Treehugger Robot
1a96443085 Merge "Add support for building with R8 full mode" am: b900066dab am: f84b6b4f89 am: 4198dc431f am: b4308c8e62 am: 47a542c0fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1408707

Change-Id: Ia0bb49244c0bebbb8e9820d011f080b1d3879a6b
2020-09-12 00:02:05 +00:00
Treehugger Robot
1c93a4d74a Merge "Revert "Revert "Remove create_stubs and checkapi from droiddoc""" am: b8e35ca4a4 am: 57d6fe4a8c am: 0cd65aef49 am: 06778bade1 am: b78d2a30fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1424568

Change-Id: Ib6143b28fa4bde35efaa7976b53aeb45b31ea2fc
2020-09-11 23:45:30 +00:00
Treehugger Robot
570b81ab01 Merge "Remove framework-modules naming scheme" 2020-09-11 19:58:16 +00:00
Paul Duffin
ee9ad5d526 Remove framework-modules naming scheme
The naming_scheme property was not removed as it may be useful for
future when migrating to java_sdk_library.

Bug: 168301990
Test: m nothing
Change-Id: Ie97dd60355a207f1312a2dd910f1fb25b46fd737
2020-09-11 16:09:15 +01:00
Liz Kammer
9ed7915f01 Updates checkapi filename properties behavior
Previously Api_filename and Removed_api_filename were treated as
booleans based on whether they were non-empty, the supplied filenames
are used.

Test: go tests
Test: m
Bug: 143135631

Change-Id: I72c86eaf3b314eb2eb3afd0b2acf7d4b102ddb03
2020-09-11 07:49:45 -07:00
Ulya Trafimovich
663dc53c94 Consistently use default install path for compatibility <uses-library>.
Previously default install path was provided only for comatibility
libraries that are added explicitly via `uses_libs`/`optional_uses_libs`
properties. This didn't take into account compatibility libraries that
are added by Soong when it computes transitive closure of SDK library
dependencies. As a result, install path in such cases remained unknown,
and the corresponding compatibility library was omitted from class
loader context, which caused 'ClassLoaderContext shared library size
mismatch' errors at first boot on device.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: If661272f46803299c8640f7f5ef161c8217d07e4
2020-09-11 11:31:22 +01:00
Treehugger Robot
b900066dab Merge "Add support for building with R8 full mode" 2020-09-10 22:41:42 +00:00
Treehugger Robot
b8e35ca4a4 Merge "Revert "Revert "Remove create_stubs and checkapi from droiddoc""" 2020-09-10 20:52:55 +00:00
Christoffer Quist Adamsen
f2d7b16dd6 Add support for building with R8 full mode
Change-Id: Ibb6fd64e8901cb4311b29b3bbb266ec8fd1835c9
Test: make external/libtextclassifier
2020-09-10 21:24:57 +02:00
Ulyana Trafimovich
b27d3a596e Merge "Replace is_uses_lib property with provides_uses_lib." am: 79a94a27b6 am: df9afcd9b6 am: c2c40cdbc5 am: ccdc6e74bd am: f31eb25bb6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1423137

Change-Id: Id402ab7da678c11c0d270df8af870819340cd24e
2020-09-10 18:28:21 +00:00
Xin Li
80dc4f137a Merge "Merge Android R" 2020-09-10 17:22:09 +00:00
Liz Kammer
e1ab250ec8 Revert "Revert "Remove create_stubs and checkapi from droiddoc""
This reverts commit 3666c7023f.

Reason for revert: This was originally reverted because it caused a breakage (b/167405890) in a branch that is no longer relevant.

Change-Id: I81063cd47b816b5b3c0ab8427432730d6b881a3f
2020-09-10 15:29:25 +00:00
Ulyana Trafimovich
df9afcd9b6 Merge "Replace is_uses_lib property with provides_uses_lib." am: 79a94a27b6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1423137

Change-Id: I22b08e951667d14b03a52b091ae34ebb885d5fd9
2020-09-10 14:58:14 +00:00
Liz Kammer
5ca3a6293e Add hidden_api for java_import
Test: go java tests
Test: m
Bug: 160455085
Change-Id: Ib6e826e32ca73ceea0799b26145ad06b1e62a1bf
2020-09-10 07:56:03 -07:00
Ulyana Trafimovich
79a94a27b6 Merge "Replace is_uses_lib property with provides_uses_lib." 2020-09-10 14:34:20 +00:00
Kousik Kumar
c10fd9d1c6 Merge "Check UseRBE is set before replacing any template with the RE version." am: 3e0b9c031c am: f15ed4fe61 am: 4ed93ef2d6 am: 330184504b am: 08db7c4b37
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1419252

Change-Id: I02fffd8b3b85a9fb4d0d4f6e314c7e287d3b8360
2020-09-10 11:17:24 +00:00
Kousik Kumar
f15ed4fe61 Merge "Check UseRBE is set before replacing any template with the RE version." am: 3e0b9c031c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1419252

Change-Id: I52b7a3810fdf3314ae107f4b8330e9d6f62c6302
2020-09-10 09:50:35 +00:00
Ulya Trafimovich
54027b572e Replace is_uses_lib property with provides_uses_lib.
The previous property was boolean-valued and provided only the
information whether the library should be treated as <uses-library>
by Soong. The new property is an optional string, which is the name of
the <uses-library>. The name can be different from the module name, as
in the case of "qcrilhook" module which provides <uses-library>
"com.qualcomm.qcrilhook".

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I65b68e6f7c420ab9c443a76de4c917d31fcd8c8f
2020-09-10 10:47:41 +01:00
Kousik Kumar
3e0b9c031c Merge "Check UseRBE is set before replacing any template with the RE version." 2020-09-10 09:24:17 +00:00
kellyhung
35fb1bea5c Add test_mainline_module option. am: 74b00521f8 am: af286f3312 am: dfde06a662 am: bf3f14866b am: a3e7f8354c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1402513

Change-Id: I423820f6df732c2f56bac6aeb538c24de21fb300
2020-09-09 09:59:47 +00:00
kellyhung
af286f3312 Add test_mainline_module option. am: 74b00521f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1402513

Change-Id: I4824247226e786363cf94815576a93da3deb73da
2020-09-09 08:06:35 +00:00
kellyhung
74b00521f8 Add test_mainline_module option.
Bug: 165425972

Test: m HelloWorldTests
Change-Id: I6e60b3895328c4f7aef0bfb30dcdefc30ee1d8ed
2020-09-09 02:15:39 +00:00
Treehugger Robot
b2154d0d0e Merge "Don't assume host arch is always x86" am: daf735287b am: 9ef1f7d96a am: b2cf8359ea am: 29bd18fd53 am: 6fd5f554a0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1415953

Change-Id: I78cd55d31788e011c276cb7eb5b246d981effbca
2020-09-09 01:45:49 +00:00
Treehugger Robot
9ef1f7d96a Merge "Don't assume host arch is always x86" am: daf735287b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1415953

Change-Id: I049556891890833c1e7db6483e5ee6446714583e
2020-09-09 00:32:18 +00:00