Commit graph

1183 commits

Author SHA1 Message Date
Sasha Smundak
c12ecf881e Merge "Fix use_embedded_native_libs handling for android_test" am: 0e7dbebe7e
am: 4c79df0e28

Change-Id: I64aebf311c3656175aa6bf1a45c5c149ccd96717
2019-05-02 16:10:33 -07:00
Treehugger Robot
0e7dbebe7e Merge "Fix use_embedded_native_libs handling for android_test" 2019-05-02 22:10:29 +00:00
Colin Cross
d756aa05c9 Merge "Support robolectric_test" am: 5346d07108
am: 74e9718189

Change-Id: I271db13eb5c2cee1e72d0b68bd9666bad4e10e24
2019-05-02 09:55:30 -07:00
Colin Cross
5346d07108 Merge "Support robolectric_test" 2019-05-02 16:37:33 +00:00
Jaewoong Jung
212106a722 Merge "Add android_app_import." am: e7d52c779f
am: 5fa44dfb04

Change-Id: I1ec1d30fe592f1997f41eb66f1ad85d9b2b4abeb
2019-05-02 07:15:42 -07:00
Jaewoong Jung
e7d52c779f Merge "Add android_app_import." 2019-05-02 14:00:22 +00:00
Colin Cross
6128ec2dc1 Merge "Reverse merge order of resources and implementation" am: b5ad835dfe
am: d2c3fb93b6

Change-Id: Ib4c8c0022c2dcb72c2c61adca0dfdc944d7bb841
2019-05-01 21:07:38 -07:00
Treehugger Robot
b5ad835dfe Merge "Reverse merge order of resources and implementation" 2019-05-02 03:04:24 +00:00
Colin Cross
0ef0816727 Support robolectric_test
robolectric_test will compile a suite of tests that run in
robolectric.  For now it also generates a Run* rule, later
that will be removed in favor of atest.

Bug: 123248659
Test: m RunSettingsLibRoboTests
Change-Id: I12407d0b0d639e31c1969077ba787e8985e6a506
2019-05-01 16:41:44 -07:00
Sasha Smundak
6ad772597d Fix use_embedded_native_libs handling for android_test
`use_embedded_native_libs: true` should cause
`--extract-native-libs=false` be added to the manifest_fixer invocation,
and it was not happening.
There are also minor naming improvements.

Bug: 117618214
Test: treehugger and 'atest CtsDynamicLinkerTestCases' after
cts/tests/tests/dynamic_linker has been converted to Android.bp.

Change-Id: I93ec2aed3f3b185d320e56b1b4eebb71339b81ee
2019-05-01 13:16:22 -07:00
Jaewoong Jung
ccbb393651 Add android_app_import.
This is an initial version that handles the most basic cases.

Bug: 128610294
Test: app_test.go + prebuilt webview.apk
Change-Id: Ic525559aad5612987e50aa75b326b77b23acb716
2019-05-01 10:06:47 -07:00
Nicolas Geoffray
71e2242727 Merge "Add ART folks to owner of dexpreopt related file." am: 327a7e7420
am: f731037778

Change-Id: I6bec1182be181854390e0bade2b747e20e39bb3d
2019-04-30 14:04:02 -07:00
Nicolas Geoffray
327a7e7420 Merge "Add ART folks to owner of dexpreopt related file." 2019-04-30 20:36:16 +00:00
Nicolas Geoffray
5b6061d6aa Add ART folks to owner of dexpreopt related file.
Test: N/A
Change-Id: If8c7b1801e4a08e38ab75b459d9d8eff22804f06
2019-04-30 15:33:49 +01:00
Nicolas Geoffray
03e0a21e7a Pass other boot classpath locations to the apex image. am: feef2ef4d7
am: fed3ab3053

Change-Id: I98eb794d13119b1d49164ae959139264e09cba49
2019-04-30 06:52:22 -07:00
Nicolas Geoffray
feef2ef4d7 Pass other boot classpath locations to the apex image.
In order to evaluate the impact of framework classes being in an image.

Test: m
Bug: 119800099
Exempt-From-Owner-Approval: this is only for an experimental config, which we would like to see
the performance before build snap.
Change-Id: Ib0d3acf8d2718ee443b3bffe8122a54f92257691
2019-04-30 13:33:10 +00:00
Colin Cross
08a409df2d Reverse merge order of resources and implementation
Merge the resources first in case one of the static libraries
merge into the implementation jars contains a duplicate resource.
Also put the manifest into the resource jar so that the default
manifest doens't override the custom manifest.

Test: m checkbuild
Change-Id: I96d117c306bc9f1346720251d3993031992cef66
2019-04-29 10:29:24 -07:00
Colin Cross
62aee6b90a Merge "Tag dex_preopt.profile as a path" am: 3d974ec295
am: 7999578281

Change-Id: I903413a3619cfb9ddb4ed7e99c471b8b690a5336
2019-04-26 14:18:15 -07:00
Treehugger Robot
3d974ec295 Merge "Tag dex_preopt.profile as a path" 2019-04-26 20:50:28 +00:00
Colin Cross
de4e4e6a6d Tag dex_preopt.profile as a path
Tag dex_preopt.profile with `android:"path"` so that it can be used
with a filegroup.

Test: m checkbuild
Change-Id: I5d6bbfcfcf0a1a22c9478ad57d0c55fb9b9efadd
2019-04-26 10:52:32 -07:00
Colin Cross
24f65fb117 Merge changes Id93bcaea,Ia8f9f910 am: 02cbe8f1c6
am: 52313d976c

Change-Id: Iee615844666c01b225e49bba040eec4c73e970c3
2019-04-25 08:02:43 -07:00
Treehugger Robot
02cbe8f1c6 Merge changes Id93bcaea,Ia8f9f910
* changes:
  Pass --remove-tools-declarations to manifest merger
  Don't use merged manifest for android_library modules
2019-04-25 14:47:37 +00:00
Colin Cross
53f0fd2cc3 Merge "Support target.hostdex.required" am: 226586ca3c
am: 02a9b1af2c

Change-Id: Id2ad67edd62f10446e7786241b0518091239ab42
2019-04-24 17:31:15 -07:00
Colin Cross
226586ca3c Merge "Support target.hostdex.required" 2019-04-25 00:06:00 +00:00
Colin Cross
bf88157691 Make java_test_helper_library installable am: 9a4abed701
am: 3109e125b3

Change-Id: I7d587db7e3cd8a4d23e653b7295d62d7a9cdb740
2019-04-24 15:55:03 -07:00
Colin Cross
4d002bafd2 Export proguard_dictionary for java_library modules am: e8a7dc987c
am: 5452d26838

Change-Id: I991eddb63cf66016bcfc3270ee876f0cdfe7cd99
2019-04-24 15:51:55 -07:00
Colin Cross
aa1c6f1f5a Pass --remove-tools-declarations to manifest merger
Manifest merger needs --remove-tools-declarations to match
Gradle behavior.

Bug: 112607039
Test: m checkbuild
Change-Id: Id93bcaeaf03770a4acd2e1fdf44e418f55540dd3
2019-04-24 14:41:04 -07:00
Colin Cross
90c25c6893 Don't use merged manifest for android_library modules
Don't use the merged manifest for android_library modules.  We
still have to run manifest merger for android_library modules
because Make can't handle transitive dependencies, so it will
continue to merge the manifests at each library, and then merge
the manifests of direct dependencies into the final application.

Bug: 113294940
Test: m checkbuild
Change-Id: Ia8f9f910bd0a134730ddf2d542460eeddbc0a075
2019-04-24 14:40:14 -07:00
Colin Cross
7f87f4fdeb Support target.hostdex.required
Hostdex modules sometimes need extra required modules, add
target.hostdex.required.

Bug: 131167818
Test: manual
Change-Id: I599f3499f0b738556baeb27185371a42b4c2701b
2019-04-24 20:43:14 +00:00
Colin Cross
9a4abed701 Make java_test_helper_library installable
java_test_helper_library should product an installabler, dexed
library, the same as java_test just without the auto-generated
test config.

Test: m checkbuild
Change-Id: Ie573c1d24969ba9c4feb8a2e85f8969d5d713064
2019-04-24 13:19:28 -07:00
Colin Cross
e8a7dc987c Export proguard_dictionary for java_library modules
Move exporting LOCAL_SOONG_PROGUARD_DICT from AndroidLibrary
to Library so that it is exported for java_library modules.

Test: m checkbuild
Change-Id: I27ea08ad8ba9072d0648c141cdbaf447c5268f91
2019-04-24 12:52:42 -07:00
Colin Cross
4192aa50e9 Export java_host_for_device and java_device_for_host modules to Make am: 28c3eb6829
am: 0872753d91

Change-Id: Ifffaa4dd1d2943deedfb2080d1bc3386c0080eaf
2019-04-24 10:35:17 -07:00
Colin Cross
28c3eb6829 Export java_host_for_device and java_device_for_host modules to Make
Robolectric needs to reference some modules declared with
java_host_for_device and java_device_for_host from Make for now.

Bug: 122331577
Test: m checkbuild
Change-Id: I09b3848edb120f2c3ee16b449b937b650f59811b
2019-04-24 05:17:22 +00:00
Jaewoong Jung
f80055138e Merge "New AndroidMk authoring system based on entry map." am: 159a585251
am: 7cf4b87560

Change-Id: I2b9e70d207146ba5a4d2c04489cc680b6f9d0d6f
2019-04-23 09:31:18 -07:00
Jaewoong Jung
159a585251 Merge "New AndroidMk authoring system based on entry map." 2019-04-23 14:43:52 +00:00
Jiyong Park
725cb5442d Merge "Set default target SDK version for APEX" am: 6fa6dfa25d
am: 83b88315f7

Change-Id: I3d6dcbaf1c7aa38ce6c7a1a57e35355edf94ff54
2019-04-22 17:36:55 -07:00
Treehugger Robot
6fa6dfa25d Merge "Set default target SDK version for APEX" 2019-04-23 00:18:54 +00:00
Jaewoong Jung
9aa3ab1f3f New AndroidMk authoring system based on entry map.
The new system collects all Android.mk variable assignments using a map
and writes them to io.Writer. Compared to the previous system, which
directly writes all entries to buffers, this new system is more robust
and test-friendly.

Test: Built without prebuilt_etc.go change and diffed the mk output.
Test: prebuilt_etc_test.go
Change-Id: Idd28443d129ff70053295015e69328a8fa3eca47
2019-04-22 15:32:44 -07:00
Colin Cross
6479beeca0 Merge "Allow codename.fingerprint format for targetSdkVersion" am: e928452f30
am: 1a385d14ef

Change-Id: Ib5d0bb3b6501a3b1565a13d21c57cf5e1a601a03
2019-04-22 10:09:41 -07:00
Colin Cross
e928452f30 Merge "Allow codename.fingerprint format for targetSdkVersion" 2019-04-22 16:48:35 +00:00
Colin Cross
19b9e855c9 Merge "Build framework.aidl in Soong" am: 8bf9bd9f91
am: 2e2967423a

Change-Id: I177c278e520177929aeb76fc1ce6f05ebc576a20
2019-04-21 10:38:53 -07:00
Colin Cross
8bf9bd9f91 Merge "Build framework.aidl in Soong" 2019-04-21 17:20:16 +00:00
Sasha Smundak
a6cc184cfd Merge "Fix handling optimize.enabled from java_defaults" am: 36ab727c82
am: 2f65feddde

Change-Id: I9ba47791f33c2722140dcfa3ddfe2b649ee3d9bd
2019-04-19 23:39:00 -07:00
Treehugger Robot
36ab727c82 Merge "Fix handling optimize.enabled from java_defaults" 2019-04-20 06:17:14 +00:00
Jiyong Park
71b519d6ce Set default target SDK version for APEX
Target SDK version is used for targeting an APEX to a specific set of
platform builds. Usually, the targeting is unrestricted (in case the
APEX can run on all platforms), or based on platform SDK version (e.g.
28 for P). However, when the platform is under development and SDK is
not finalized, the targeting should be much more fine-grained; the
APEX should be targeted to a very specific build that supports the same
set of APIs that the APEX was built against.

To support that, target sdk version is automatically set by the build
system. When the platform is released or SDK is finalized, the target sdk
version set to the SDK version number. If not, it is set to
<version_code>.<fingerprint> (e.g., Q.123456).
Note that the target sdk version set by the build system is used only
when the target sdk version is not explicitly set in
AndroidManifest.xml.

Bug: 130541924
Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true \
UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true \
TARGET_BUILD_APPS=com.android.tzdata m
build.ninja has --target_sdk_version Q.$$(cat out/soong/api_fingerprint.txt)

Test: aapt dump badging out/dist/com.android.tzdata.apex | grep \
targetSdkVersion shows:
targetSdkVersion:'Q.6ee443d9ad5f0cca7a43cfa97b7fc62a'

Change-Id: I086230d787f01075c28fc3f0163550300fa00212
2019-04-19 14:45:41 +09:00
Colin Cross
109328714f Allow codename.fingerprint format for targetSdkVersion
Use codename.fingerprint format for targetSdkVersion if it is unset
in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true.

Test: manual
Bug: 130541924
Change-Id: I4e3b1274cc32038b00b292dc6d67559eb320e9e4
2019-04-18 16:05:37 -07:00
TreeHugger Robot
3db7eb6e8b Merge "Get default sdk_test.go values from config" into qt-dev-plus-aosp 2019-04-18 22:35:30 +00:00
Colin Cross
3047fa23da Build framework.aidl in Soong
Move the rules to build framework.aidl into Soong, and use it
when compiling aidl files with sdk_version: "current".

Also fixes incorrectly using the aidl includes exported by the
"framework" module when the proguardRaiseDep dependency was
added.

Bug: 130798034
Test: sdk_test.go
Change-Id: I126adf1d9e7b6acb528875ff62b974ba7ad9a337
2019-04-18 13:51:58 -07:00
Colin Cross
60405e50f8 Get default sdk_test.go values from config
This will help avoid merge conflicts between branches that have
additional default libraries.

Test: sdk_test.go
Change-Id: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
Merged-In: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
2019-04-18 12:35:16 -07:00
Colin Cross
901ea31b7c Get default sdk_test.go values from config
This will help avoid merge conflicts between branches that have
additional default libraries.

Test: sdk_test.go
Change-Id: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d
2019-04-18 12:34:10 -07:00
Sasha Smundak
2057f82161 Fix handling optimize.enabled from java_defaults
Some module types (`android_test`, etc.) set `optimize.enabled` by
default. If such module happens to have `defaults` attribute which
clears `optimize.enabled`, the latter value is ignored.

Fixes: 129858282
Test: unit tests in java_test.go,
`atest CtsExtendedMockingTestCases` succeeds with aog/936802
reverted (that is, with cts/test/mocking converted to Android.bp)

Change-Id: Ib8e3a0ab0bd489d70ed07f626082aeae31c45e7c
2019-04-17 17:59:09 -07:00
Colin Cross
a2181fdc2d Add support for prebuilt java_sdk_library modules am: 79c7c26d8a
am: c1afb65520

Change-Id: Ia26c7f53332a4821218476d6c796f7ab39928b87
2019-04-17 16:03:54 -07:00
Colin Cross
79c7c26d8a Add support for prebuilt java_sdk_library modules
Add java_sdk_library_import for use when a java_sdk_library may
be used by unbundled branches that do not have the project that
contains the original java_sdk_library module.

Bug: 130287656
Test: m checkbuild
Change-Id: I62df4bccc0da95ed6c8b31dab8f2c32cc3215e9e
2019-04-17 11:28:34 -07:00
Colin Cross
f449d2aedb Merge "Use LoadHook to create modules in java_sdk_library" am: 59d4a31063
am: 414d337702

Change-Id: Ide9449f45066883662d05946fbbd43b142ec208f
2019-04-17 01:46:32 -07:00
Colin Cross
f8b860a0fb Use LoadHook to create modules in java_sdk_library
Creating new modules in a mutator is dangerous, as other mutators
that need to see the new modules may already have run, in this case
the prebuilts mutator.  Move SdkLibraryMutator to a LoadHook instead.
Also moves registering the LoadHook mutator to testing.go so it is
registered for all tests.

Test: m checkbuild
Change-Id: I08bd76a0e6205d2ca27861058067a1562c339eed
2019-04-16 21:46:28 +00:00
Colin Cross
3b4319f2a9 Merge "Make makevars deterministic" am: a88fbdef78
am: 4315944c16

Change-Id: Ibca9e4b4a685ad0debde6972ec311c2f038071d5
2019-04-15 18:16:42 -07:00
Colin Cross
91268c668c Make makevars deterministic
Sort map keys before iterating over them to produce makevars.

Bug: 130411407
Test: m checkbuild
Change-Id: I4153977705da05a5c73e641f93d02f408209c897
2019-04-12 14:55:16 +00:00
Colin Cross
6db352f959 Zip boot image am: df8eebecaa
am: c832b1516d

Change-Id: I8319c546fe77d80a5090bad90adedaace4ad53d6
2019-04-11 16:18:45 -07:00
Colin Cross
df8eebecaa Zip boot image
Create a zip file containing the zipped boot image files.

Test: m out/soong/sailfish/dex_bootjars/boot.zip
Change-Id: I1b08c9aca962a5999585cbe9e665693ef4558524
2019-04-11 23:03:23 +00:00
Dan Willemsen
c5f8f6e93f Stop using build/target -> build/make/target symlink am: 412160e1c9
am: 8862c76a68

Change-Id: I0dacd807818a58934d436724401335f2c8366c37
2019-04-10 13:46:48 -07:00
Dan Willemsen
c701896777 Include proper deps for signapk am: c4bd8f8282
am: 671f226029

Change-Id: I616b0878e6fa49c29eb438eeed1b3928cd60ee4c
2019-04-10 13:45:53 -07:00
Dan Willemsen
412160e1c9 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: I07ba0e9b0604919a271afd5133070616e1f404fc
2019-04-09 21:36:26 -07:00
Dan Willemsen
c4bd8f8282 Include proper deps for signapk
Bug: 130111713
Test: run signapk remotely, action succeeds after this change
Change-Id: I1670a27341591e0762cdfb42bcf424f065837192
2019-04-09 21:26:14 -07:00
Dan Willemsen
868e299039 Merge changes I2bff8fb8,Ifa584479 am: cb4e0551a2
am: 787b999bc0

Change-Id: Idbc987afbaf1fcc183629431a745c9ae41bb215f
2019-04-09 18:26:03 -07:00
Dan Willemsen
aad19605c5 Add extra used dependencies
Found while executing the build actions remotely.

Bug: 130111713
Test: treehugger
Test: run actions remotely with given dependencies, they pass.
Change-Id: I2bff8fb8ccf50fde446d6bcef0f1dca9b2974b4b
2019-04-09 09:50:25 -07:00
Nicolas Geoffray
6deaa031ab Merge "Use the full dexpreopt boot classpath when preopting with other images." am: ce93e3c672
am: 9ca94c7872

Change-Id: Ia01a517be9cb42151a8e57e391a72ff482935219
2019-04-09 00:20:55 -07:00
Nicolas Geoffray
ce93e3c672 Merge "Use the full dexpreopt boot classpath when preopting with other images." 2019-04-09 06:04:43 +00:00
Vladimir Marko
d20a62f8e1 Check package restrictions for Java libs. am: 0975ee0de3
am: f81df9115f

Change-Id: I36ba3c8a96b0e566f79babf213e13737018bcb0c
2019-04-08 13:21:52 -07:00
Nicolas Geoffray
06758a7e13 Use the full dexpreopt boot classpath when preopting with other images.
Bug: 119800099
Test: m
Change-Id: Ia9b34aa92ebb1b4de96ea0f8f290d798be19b2cf
2019-04-08 17:20:27 +01:00
Vladimir Marko
0975ee0de3 Check package restrictions for Java libs.
Test: m checkbuild; inspect verbose log.
Test: Manual - compile with unmet restrictions.
Bug: 122937705
Change-Id: I9360ae8b6d9ce016b7827be5e8ffc6eb521809b7
2019-04-08 14:02:14 +01:00
Nicolas Geoffray
fc0cc43da6 Merge "Use the apex image when the device config asks for it." am: 56405f8071
am: b32c872116

Change-Id: Ic40b3c44bc9c9d85f532878475f14489d5743069
2019-04-05 09:46:59 -07:00
Sasha Smundak
8b48326fbd Merge "Implement host_required and target_required properties." am: b9045cf28c
am: 0e47e406de

Change-Id: I476551e94329a1703d9afddc6cb25e7311ac64ef
2019-04-05 08:34:46 -07:00
Nicolas Geoffray
56405f8071 Merge "Use the apex image when the device config asks for it." 2019-04-05 09:34:34 +00:00
Sasha Smundak
b6d230515e Implement host_required and target_required properties.
They are counterparts of LOCAL_HOST_REQUIRED_MODULES and
LOCAL_TARGET_REQUIRED_MODULES respectively.

Fixes: 128693436
Test: treehugger, convert cts/hostsidetests/devicepolicy/Android.bp
Change-Id: Id66ffca6edffe18993ac51e8930f1d0e78178249
2019-04-04 11:24:01 -07:00
Nicolas Geoffray
25c0e03520 Use the apex image when the device config asks for it.
Test: lunch walleye_jitzygote-userdebug m && all odex file use the apex image
Bug: 119800099
Change-Id: Id2fff6a4569d48b8e6a886cb82bdba205b0dd56a
2019-04-04 18:50:56 +01:00
Colin Cross
11fbb890c9 Fix package path of android/soong/android pctx am: cc0ce80ed5
am: a1c57b4664

Change-Id: Ifba10892f902e70bd0a52a82a20bd5f1b64a61de
2019-04-04 01:39:57 -07:00
Colin Cross
cc0ce80ed5 Fix package path of android/soong/android pctx
android/soong/common was renamed to android/soong/android long
ago, but the pctx package path was still "android/soong/common".
This required all users of rules defined in android/soong/android
to import "android/soong/android" and then
pctx.Import("android/soong/common").

Test: m checkbuild
Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
2019-04-04 03:59:34 +00:00
Colin Cross
49c87dfae9 Merge "Fix sdk_version: "system_current" when Platform_sdk_final=true" am: b007b2bde5 am: 8c3f398c6c
am: 209edee425

Change-Id: I54ea846c9ac2b29354109755225db71dcdaa1527
2019-04-03 14:04:07 -07:00
Colin Cross
b007b2bde5 Merge "Fix sdk_version: "system_current" when Platform_sdk_final=true" 2019-04-03 18:40:09 +00:00
Colin Cross
bf9f355f8d Merge "Fix panic when missing hiddenapi jar" am: f5df780fc2 am: f5a8e0e88d
am: c2c2824ff9

Change-Id: I358685842ca77c435a02b52bf2b278a841a51808
2019-04-03 07:23:30 -07:00
Colin Cross
ff0daf4ccf Fix sdk_version: "system_current" when Platform_sdk_final=true
When PLATFORM_VERSION_CODENAME is set to REL Platform_sdk_final
becomes true, which causes the return value of sdkVersionToNumber
for "system_current" to a real version number instead of
FutureApiLevel.  This enables the check against
PlatformSystemSdkVersions, which doesn't contain "current".  Use
the numeric value instead.

Fixes: 129786845
Test: sdk_test.go
Change-Id: If7cf211cc01c5fbf3e3ece3c3f604718a13d5a9b
2019-04-02 23:18:30 +00:00
Colin Cross
caa0e1e341 Fix panic when missing hiddenapi jar
Fix a panic after reporting an error when a module is listed
in ProductHiddenAPIStubs but doesn't exist or doesn't produce
a dex jar.

Test: manual
Change-Id: I43643cbc5303536bfe0b02feedb03563ea0b540a
2019-04-02 13:03:46 -07:00
Colin Cross
32762a08eb Add support for protoc plugins am: fe17f6f0e8 am: 91c063cfdc
am: 7299e418df

Change-Id: I30e57f6678343f57233831775b62afa1f043a450
2019-04-02 10:31:28 -07:00
Colin Cross
57205f3cb4 Move proto compilation to RuleBuilder am: 19878da6a0 am: 61918685aa
am: c8a3eb9110

Change-Id: If3922ee1900d6f3888c7291997ac49d4a939c065
2019-04-02 10:31:13 -07:00
Colin Cross
fe17f6f0e8 Add support for protoc plugins
Add a proto.plugin property to allow specifying a custom protoc
plugin to generate the code.

Fixes: 70706119
Test: m am StreamingProtoTest
Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
2019-04-02 16:38:55 +00:00
Colin Cross
19878da6a0 Move proto compilation to RuleBuilder
Using blueprint.Rule for protoc commands was causing code duplication
because there was no good way to run the same protoc for cc, java and
python but then run custom source packaging steps for java and python.
Move most of the code into a common function that returns a
RuleBuilder, and then let java and python add their own commands at
the end of the rule.

Bug: 70706119
Test: All Soong tests
Test: m checkbuild
Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
2019-04-02 16:38:47 +00:00
Colin Cross
a50a2464c6 Merge changes I7dd4ba7f,I7887a67a am: 92cc71606c am: 900574f0cd
am: 6c99a30bb7

Change-Id: If557897ed64ecdf8967299b5512392e5485767ae
2019-04-02 08:21:42 -07:00
Colin Cross
92cc71606c Merge changes I7dd4ba7f,I7887a67a
* changes:
  Add depfile support to RuleBuilder
  Add RuleBuilderCommand.Flags
2019-04-02 15:04:06 +00:00
Andrei-Valentin Onea
78eeaffcfc Merge "Automatically greylist code in 3P packages" am: dca6ac3e35 am: 595282ced1
am: 364388b3a5

Change-Id: I90eb022de6f2d718e8b2637a4c05dd2859045c67
2019-04-02 06:47:21 -07:00
Andrei-Valentin Onea
dca6ac3e35 Merge "Automatically greylist code in 3P packages" 2019-04-02 13:10:37 +00:00
Colin Cross
1d2cf0494a Add depfile support to RuleBuilder
Allow rules built with RuleBuilder to use depfiles.  Ninja only
supports a single depfile with single output.  If there are
multiple outputs in a rule, move all but the first to implicit
outputs.  If multiple depfiles are specified, use new support
in dep_fixer to combine additional depfiles into the first depfile.

Test: rule_builder_test.go
Change-Id: I7dd4ba7fdf9feaf89b3dd2b7abb0e79006e06018
2019-03-29 16:35:06 -07:00
Andrei Onea
896237b7b9 Automatically greylist code in 3P packages
Bug: 129387816
Test: m appcompat
Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: Id55abed766a6de6a2c032ee12d5153ab73a8d65c
2019-03-29 16:51:43 +00:00
Jaewoong Jung
a4edf844da Merge "Fix an override_module bug." am: 044ead6b1a am: 5ce95f2eaf
am: ac24969630

Change-Id: I352a380486600c0b48a61daa0457eff09ceb8f66
2019-03-27 16:13:22 -07:00
Jaewoong Jung
a641ee9cc7 Fix an override_module bug.
proptools.PrependProperties doesn't replace a pointer when both the src
and the dst have one. This prevented override_module from overriding
simple value pointer properties when the base module has existing
values. It turns out this was why the name property needed to be
overwritten manually.

Bug: 122957760
Test: app_test.go
Change-Id: I3302287c31a560422548c22fade95261ddbe606a
2019-03-27 11:21:24 -07:00
Colin Cross
fdd34fae76 Merge "Always package JNI libs into android_test modules" am: eae12cf400 am: f394fb0a27
am: b1af785608

Change-Id: I73d8243ae1bd428098f4f60b4a22c9b50785c481
2019-03-27 09:07:26 -07:00
Colin Cross
47fa9d3d83 Always package JNI libs into android_test modules
android_test modules should always have native libraries packaged
into the APK even when use_embedded_native_libs: false is set.

Fixes: 129298278
Test: TestJNIPackaging
Change-Id: Idfcc630f7c6579c1280a920b5d71808b0a502e06
2019-03-27 15:09:52 +00:00
Jaewoong Jung
a97234fc3a Merge "Add package_name property to android_app." am: c7dd408f89 am: 2afb72b7a0
am: fa1f34f99f

Change-Id: I59d3f61a8624a2ad4f356d95c67c4d97cbd4c0a4
2019-03-27 07:31:03 -07:00
Jaewoong Jung
c7dd408f89 Merge "Add package_name property to android_app." 2019-03-27 14:13:15 +00:00
Jaewoong Jung
6f373f60c4 Add package_name property to android_app.
This enables users to override the package name of their apps either
directly in android_app or through override_android_app.

Bug: 122957760
Test: app_test.go
Change-Id: I98080a4076ce970fc85e58fc33495ba9b363eec9
2019-03-26 15:17:17 -07:00
Paul Duffin
e301bb88f9 Merge "Add java_test_helper_library" am: d637872f44 am: e988582019
am: 036526adad

Change-Id: Ie734f0aec3b503d0cc767772bc7422c435f9fbe6
2019-03-26 07:30:51 -07:00