Commit graph

21 commits

Author SHA1 Message Date
Jiyong Park
dbd710c426 SdkSpec is fully using ApiLevel
Previously, SdkSpec was constructed only from the user string. It didn't
make use of the Config struct where information about the latest stable
SDK version, etc. is recorded. As a result, the build system couldn't
check if the sdk version "current" is referring to the in-development
(i.e.  not-yet-frozen) SDK version or the latest stable version.
"current" was always assumed to be in-development (IsPreview() returns
true) even when Platform_sdk_final == true.

As the first step for fixing that, this change requires
android.EarlyModuleContext to be passed when constructing SdkSpec from
the user string.

In the following changes, "current" will be mapped to either
FutureApiLevel (10000) or one of the FinalApiLevels() depending on
whether the platform SDK was finalized or not.

Bug: 175678607
Test: m
Change-Id: Ifea12ebf147ecccf12e7266dd382819806571543
2021-04-12 13:46:21 +09:00
Jiyong Park
7f61ac4c8b Merge "Move java.sdkSpec to the android package" am: d4fa8fc107 am: 7ff95eca2f am: f19d2d57b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655587

Change-Id: I5c5d25a78c4f51876289dc450874d83c5a9c90b6
2021-04-03 13:16:03 +00:00
Jiyong Park
f19d2d57b3 Merge "Move java.sdkSpec to the android package" am: d4fa8fc107 am: 7ff95eca2f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655587

Change-Id: I748c9c8d1eebacbd379121e32c54eff237ca0a80
2021-04-03 12:34:19 +00:00
Jiyong Park
f1691d2a2c Move java.sdkSpec to the android package
... in preparation for making the handling of sdk versions consistent
across java and cc modules.

Bug: 175678607
Test: m
Change-Id: I598f0454bce9b7320621022115412fbe97403945
2021-04-03 08:25:12 +09:00
Jaewoong Jung
bc098a5c26 Merge "Lineage properties support module references." am: 6df5e0307d am: c3df3c5396 am: 4bd1fc1763
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625101

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id5f3b9ab9ba11e274a4921a9ab07392b1bb891ff
2021-03-11 03:04:25 +00:00
Jaewoong Jung
4bd1fc1763 Merge "Lineage properties support module references." am: 6df5e0307d am: c3df3c5396
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1625101

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8541e1e2aa1e9866e7616167f3305e2cd9c53419
2021-03-11 02:19:57 +00:00
Jaewoong Jung
1c1b6e6d95 Lineage properties support module references.
They should have had `android:"path"` tags attached so that users can
point them to filegroup modules.

Test: app_test.go & app_import_test.go
Bug: 182175153
Change-Id: I5580408488ffe5fc12c869cbfb7a468713dcbc96
2021-03-09 15:14:34 -08:00
Jaewoong Jung
f75649f692 Merge "Add additional_certificates to android_app_import." am: 05ebca4f7f am: 6ea8f69bc5 am: f10cb18a20
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1622565

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iba08d54ace799cb2a6dba7cc5983234fcee5f33f
2021-03-09 16:27:01 +00:00
Jaewoong Jung
f10cb18a20 Merge "Add additional_certificates to android_app_import." am: 05ebca4f7f am: 6ea8f69bc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1622565

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9ccbc3abbfad8807ca00f4fd27a23d975483f6b3
2021-03-09 15:44:34 +00:00
Jaewoong Jung
25ae8dec91 Add additional_certificates to android_app_import.
Bug: 182175153
Test: app_import_test,go
Change-Id: I467e98065945b59dcc574a18144756edccdea441
2021-03-08 17:37:46 -08:00
Ulyana Trafimovich
65253cd2ac Merge "Do verify_uses_libraries check for APKs after patching library names." am: 97df5e65b0 am: e073aa2af2 am: d0f9821127
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609481

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iba51b522daa4a85ac3875bc4c101edff174ee0cc
2021-03-03 00:23:35 +00:00
Ulyana Trafimovich
d0f9821127 Merge "Do verify_uses_libraries check for APKs after patching library names." am: 97df5e65b0 am: e073aa2af2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609481

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I100a6591ff3357d0129a090d0303cbf662766351
2021-03-02 23:25:17 +00:00
Ulya Trafimovich
fe927a265e Do verify_uses_libraries check for APKs after patching library names.
Some of the `uses_libs`/`optional_uses_libs` libraries may have a
library name that is different from the module name. In that case it is
necessary to patch these properties after `provides_uses_lib` for the
library is applied.

Bug: 132357300
Test: m nothing
Change-Id: I2e2248053787557f955a6b363c22e3bad0301ec7
2021-03-01 17:50:16 +00:00
Ulyana Trafimovich
92dac721f6 Revert^3 "Enforce <uses-library> checks for android_app and android_app_import."
This reverts commit c2b6b65d73.

Reason for revert: These changes should only be reverted in
  rvc-qpr-dev-plus-aosp, but not in master.

Bug: 132357300
Test: treehugger
Change-Id: I3243668ce9a399936b0e9dde09c42db6cc45d562
2021-02-17 18:13:33 +00:00
Bill Peckham
6603b7ab73 Merge "Enable android_app_import to supply framework-res." am: 5c2406bde9 am: 50b395b740
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1543901

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia87c7583798ab5c053a154dd8d67b579dd65d8e7
2021-02-08 20:19:59 +00:00
Bill Peckham
a036da9b27 Enable android_app_import to supply framework-res.
By enabling an android_app_import module to supply the
special framework-res module, it becomes possible to
create a split build that excludes the source of over
10,000 files under frameworks/base/core/res, replacing
this source with a prebuilt. However, since other parts
of a monolithic build use the source of framework-res,
this scheme works only if your split build manifest
excludes modules that depend on framework-res source.

Bug: 176851898
Test: lunch aosp_arm64-userdebug && m nothing
Test: new TestAndroidAppImportExportPackageResources
Test: local build without prebuilt framework-res
Test: local build with prebuilt framework-res
Change-Id: If00d9dbc656c8406c038448d09f93f767c1e06d1
2021-02-05 14:30:46 -08:00
Ulyana Trafimovich
136d087a8e Merge "Write module dexpreopt.config for Make." am: a4fce3b488 am: 682808f0ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541538

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4c0696bbcf536ddbf875c9e6c9e43bbc602b4b3f
2021-02-01 11:02:14 +00:00
Ulya Trafimovich
76b0852a48 Write module dexpreopt.config for Make.
This is needed for Java libraries that are <uses-library> dependencies
of Java libraries and apps defined as Make modules. Each dexpreopted
module in Make generates a dexpreopt.config file, which incorporates
information from its dependencies' dexpreopt.config files. For
dependencies that are Make modules their dexpreopt.config files are
generated by Make, and for Soong modules they are generated by Soong.
Since Soong doesn't know which libraries are used by Make, it generates
build rules for a superset of the necessary libraries.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I325b1037658736ee3c02450b08c00eca1a175962
2021-01-28 06:29:13 +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
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
Jaewoong Jung
f9b44657c8 Break up app.go.
Test: m nothing + TreeHugger
Change-Id: I64c6d7f10530c424bc282d8111dfaf9159426f00
2020-12-21 12:31:51 -08:00