Commit Graph

20339 Commits

Author SHA1 Message Date
Paul Duffin dd9bbf981f Merge "java_sdk_library: Create separate impl library" am: b1e61be41d
Change-Id: Ifa278ecb68419eba41a0a5f4a8e7593c2b6d44a7
2020-05-27 17:24:03 +00:00
Paul Duffin b1e61be41d Merge "java_sdk_library: Create separate impl library" 2020-05-27 17:14:15 +00:00
Liz Kammer 63f3b9a501 Merge "Add test to ensure test data written for flat apex" am: 5903b669ad
Change-Id: I19dad70ba5734678bfe70f0df806ee9a24272f0b
2020-05-27 16:48:13 +00:00
Liz Kammer 21a4ee6b6a Merge "Support preprocessed prebuilt tests in androidmk" am: fd0d56af24
Change-Id: I743f218083b5515bdc7b5789e0ffdd2e6dfcaacd
2020-05-27 16:48:05 +00:00
Jaewoong Jung 13ead1de9f Merge "Make android_app_import multi targets arch module." am: 3f2845d251
Change-Id: I978592ccca49ec6bdc1d99e22333eb06164e549d
2020-05-27 16:28:33 +00:00
Liz Kammer 5903b669ad Merge "Add test to ensure test data written for flat apex" 2020-05-27 16:24:08 +00:00
Liz Kammer fd0d56af24 Merge "Support preprocessed prebuilt tests in androidmk" 2020-05-27 16:22:54 +00:00
Jaewoong Jung 3f2845d251 Merge "Make android_app_import multi targets arch module." 2020-05-27 16:14:58 +00:00
David Srbecky 541d1002f5 Merge "Allow the user to explicitly set the java Uncompress_dex property." am: 38b2a86091
Change-Id: I6a687915d745dbeacfbf85d44b161ed6c348d34b
2020-05-27 14:10:11 +00:00
David Srbecky 38b2a86091 Merge "Allow the user to explicitly set the java Uncompress_dex property." 2020-05-27 13:45:29 +00:00
Dan Albert e2054a9f9d Add some app modules to the allowed whitelist.
Test: treehugger
Bug: 152482542
Change-Id: Ia7adf690cd6dca1408ae0a340860eaeae6c1d4b4
Merged-In: Ia7adf690cd6dca1408ae0a340860eaeae6c1d4b4
(cherry picked from commit 6b6d387a75)
2020-05-27 14:15:57 +01:00
Paul Duffin 5df793011d java_sdk_library: Create separate impl library
Most dependencies on java_sdk_library instances (JSL) simply reference
them by name and rely on the build to pick the correct part, impl,
stubs for a specific scope, headers or implementation jars or dex jars.
Generally, the build gets that decision right. If it does not the for
most of the components of the JSL there is a way to reference them
directly. However, that is not true for the implementation library as
that is created the JSL itself.

Access to the implementation library should be avoided as it opens up
the possibility that use will be made of an API that is not tracked and
maintained which could lead to compatibility issues. However, there is
a case where use of the implementation library is required and safe.
That is when it is being used from other libraries within the same APEX
as the JSL. In that case the JSL and its dependencies will be updated
together so compatibility is not an issue.

This change adds a new <module>.impl java_library that compiles the
implementation library in the same way as the JSL itself does. This will
allow the modules that are blocked from converting to JSL because of
this limitation to progress. Initially the library is only for use
for compiling but follow up changes will switch the rest of the build
from using the implementation library created by JSL to the separate
module.

It also adds the ability to give the separate .impl library a more
restrictive visibility than the JSL further limiting misuse.

Bug: 156618935
Test: m droid, flash, atest CtsProviderTestCases - sniff test
      tested that it fixes compilation issues with mainline module
Change-Id: Ifc4799feb4ada9dec8021efc13fe6a953bf2edd3
2020-05-27 12:53:26 +01:00
Ramy Medhat c7965cda05 Add support for Metalava implicit dependencies for remote execution.
Test: built aosp crosshatch userdebug with RBE_METALAVA=1
Change-Id: Ic64d98785e34717ef9bdad62b4885085f84f132a
2020-05-27 06:52:46 -04:00
Anton Hansson e64809ff83 Merge "Remove conditional running of checklast during checkapi" am: 54d925e88d
Change-Id: I4fb609add51356d0efd3e36a0cf47912f56fdf77
2020-05-27 10:46:24 +00:00
Anton Hansson 54d925e88d Merge "Remove conditional running of checklast during checkapi" 2020-05-27 10:28:41 +00:00
Yo Chiang 3d64d494d2 Add symlinks support for prebuilt_etc modules
Filenames specified in the "symlinks" property are passed to
LOCAL_MODULE_SYMLINKS, and kati would install these symlinks.

For example:
```
prebuilt_etc {
  name: "foo",
  symlinks: [
    "bar",
    "baz",
  ],
}
```

Installs these files on device:
- system/etc/foo
- system/etc/bar -> foo
- system/etc/baz -> foo

Bug: 157537895
Test: Add some symlinks to a prebuilt_etc module and check artifact
Change-Id: If50844e8a212a966be931117cfdff5bf73aadf25
2020-05-27 17:56:39 +08:00
Lukács T. Berki bb751686ae Merge "Call Delve using exec() instead of "dlv attach"." am: ad37304762
Change-Id: I453fa205399d208591e30e6e665c2d4be1220349
2020-05-27 08:49:43 +00:00
Lukács T. Berki ad37304762 Merge "Call Delve using exec() instead of "dlv attach"." 2020-05-27 08:33:32 +00:00
Treehugger Robot d3205312ed Merge "AIDEGen: Add path attribute to okhttp module." am: c7c7e466ac
Change-Id: I1792658947da52e6181b39cc952f1ff11be1163b
2020-05-27 07:30:01 +00:00
Treehugger Robot c7c7e466ac Merge "AIDEGen: Add path attribute to okhttp module." 2020-05-27 07:18:19 +00:00
Dan Willemsen 570a292bab Better handling of low memory situations
Drop down to a single high-mem task when we've got <=16GB, as the system
probably isn't completely free RAM, ninja will be using a couple gigs,
along with whatever "normal" actions will be running concurrently. So
it's unlikely that we can handle two 6-8GB actions along with everything
else.

Also print warnings when we detect <=16GB total RAM, or when we're
running more parallel jobs than than we have GB RAM. These both notify
the user and suggest lowering the `-j` value if they run into problems.

Test: fake totalRAM to [0.5,8,16]GB, checking warning
Test: fake totalRAM to 17GB, `m -j4 nothing` has no warning
Test: `m -j187 nothing` on a 188GB system
Test: `m -j188 nothing` on a 188GB system
Change-Id: Ieb008e9f462d5f40fb65781d94cf116b1caf8446
2020-05-26 23:29:18 -07:00
Kousik Kumar a858736c86 Merge "Add support for remote-execution / caching of turbine actions" am: 97d095516e
Change-Id: Ic5b941bc743ca9471393f1f8467daa9591d674d5
2020-05-27 04:01:27 +00:00
Kousik Kumar 97d095516e Merge "Add support for remote-execution / caching of turbine actions" 2020-05-27 03:41:50 +00:00
Jaewoong Jung 6abfbf7f9c Make android_app_import multi targets arch module.
I made a mistake and only fixed android_test_import in my previous
change, I5bbb2d2b733bbd6b868898285683ba5ff45be10b.

Bug: 154281342
Test: TreeHugger
Test: chromium-webview
Change-Id: I1575d9ef3f8596f1eb8db0867db09de08945d711
2020-05-26 20:10:08 -07:00
Paul Duffin 033f903c76 Switch droiddoc to use SdkHeaderJars() am: 649dadfb87
Change-Id: I759808445fe9fa92fa52181fb0098e6c6136a7c4
2020-05-26 21:49:27 +00:00
Paul Duffin af853b758f java_sdk_library: Expose implementation within APEX am: 9b879594ed
Change-Id: Id2517fa4b099a75663b2f8599f280223aafa25f8
2020-05-26 21:49:24 +00:00
Paul Duffin d3320c8787 java_sdk_library: Only expose impl jars when they are built am: daaa332827
Change-Id: I18f5be5e66fca6c1185b5c3f92d790a2fee8b3c2
2020-05-26 21:49:02 +00:00
Paul Duffin 649dadfb87 Switch droiddoc to use SdkHeaderJars()
Previously, droiddoc was using SdkImplementationJars() to get a JAR to
add to the classpath in order to resolve unknown references in the
source.

Given that SdkHeaderJars() returns jars created by Turbine which are
(for compilation at least) functionally identical to the implementation
jars there is no point in using the implementation jars.

Bug: 148080325
Test: m nothing
Change-Id: I2b718cc1445c04e849dcb0b1f53bba2b0bd90c95
2020-05-26 18:32:44 +01:00
Paul Duffin 9b879594ed java_sdk_library: Expose implementation within APEX
Access to the implementation JARs is restricted to avoid code from
depending on implementation details that could change from one release
to the next which could cause compatibility issues. That is not a
problem when referenced from within the APEX that contains the
java_sdk_library.

As references from within the same APEX often need to access
implementation specific details of the java_sdk_library and doing that
from within the same APEX is safe this change all references to a
java_sdk_library made within the same APEX to use the implementation
jars instead of stub jars.

Bug: 155164730
Test: m droid
Change-Id: If239059690de61683c2ad2d8a0ce2e47286a3637
2020-05-26 18:32:44 +01:00
Paul Duffin daaa332827 java_sdk_library: Only expose impl jars when they are built
The implementation jars are not built if api_only: true. In that case
the jar paths must not be exposed implicitly as they will be nil and
they will just be ignored.

This change ensures that stubs are returned when the implementation
jars are not built.

Bug: 155164730
Test: m droid
Change-Id: Ic495982a5dcb2754916260e7d91d921a5da288ae
2020-05-26 18:32:44 +01:00
Anton Hansson 668b8a21cf Remove conditional running of checklast during checkapi
Since the metalava invocations have been merged into a single one,
and checkapi already requires the other timestamp, this has no effect.

Bug: 151160048
Test: m checkapi
Change-Id: I560058f0f4cdeaedaf247cd35119da2cf0b86ea0
2020-05-26 18:09:33 +01:00
Nikita Ioffe df5ef957cc Merge "Always set targetSdkLevel to DefaultAppTargetSdk" am: 62bd3c7b47
Change-Id: I2aae04937917406f12c7446aa5e4349a4aa5d143
2020-05-26 16:58:20 +00:00
Nikita Ioffe 62bd3c7b47 Merge "Always set targetSdkLevel to DefaultAppTargetSdk" 2020-05-26 16:47:42 +00:00
Liz Kammer 6e85e4c2bc Support preprocessed prebuilt tests in androidmk
Adds support to translate app prebuilt tests to android_test_import and
LOCAL_REPLACE_PREBUILT_APK_INSTALLED to preprocessed property.

Test: androidmk_test.go, bpfix_test.go
Bug: 155412211
Change-Id: I77c07c684125adf228ba91911998823a68b3a65d
2020-05-26 09:12:42 -07:00
Treehugger Robot 327b94a92a Merge "java_sdk_library: Simplify SdkLibrary.sdkJars" am: 3f82e2426e
Change-Id: Ide69775757b1cf0c3346a1e43b9f29e89c1ad098
2020-05-26 16:00:52 +00:00
Treehugger Robot 3f82e2426e Merge "java_sdk_library: Simplify SdkLibrary.sdkJars" 2020-05-26 15:46:52 +00:00
Jooyung Han 43d3025cd5 pom2bp: add apex_available/min_sdk_version
apex_available/min_sdk_version are required to be available for mainline
modules(APK/APEX).

- java_import/java_library_static
- android_library/android_library_import

Bug: 156996905
Test: prebuilts/sdk/update_prebuilts.sh
Change-Id: I201ebabaa533c5ee19e394ab30ca2fa0e3d7ce0e
2020-05-27 00:37:45 +09:00
satayev 3a0a6427bd Merge "Generate combined deps-info for all updatable modules." am: ede18549e5
Change-Id: If886f3b3228b8e26138dff0329c03aad9c71d33d
2020-05-26 13:47:02 +00:00
satayev ede18549e5 Merge "Generate combined deps-info for all updatable modules." 2020-05-26 13:28:28 +00:00
Paul Duffin c91f5d0cc7 java_sdk_library: Simplify SdkLibrary.sdkJars
The expression !sdkVersion.specified() is equivalent to the following:
    !sdkVersion.valid() || sdkVersion.kind == sdkPrivate

That means that the else if clause "sdkVersion.kind == sdkPrivate" will
never be reached so it was removed.

There is also no need to check sdkVersion.valid() as that will already
have been checked, and an error reported, before this code has been
called. Therefore that has been removed.

Bug: 148080325
Test: m nothing
Change-Id: Ib7c544b48dfb53bad3e15f9f73f71bd05cff9b49
2020-05-26 11:12:28 +01:00
Treehugger Robot 3d075275c2 Merge "Add preprocessed property for android_test_import" am: 42ada5cff3
Change-Id: Ie29e07ede82444235182a79aa74939e9358e7389
2020-05-21 22:38:18 +00:00
Treehugger Robot 42ada5cff3 Merge "Add preprocessed property for android_test_import" 2020-05-21 22:22:28 +00:00
Liz Kammer 3b70b3fea5 Add preprocessed property for android_test_import
If set to true, preprocessed indicates that the prebuilt apk is
installable as is and does not need any further processing (e.g.
zipaligning, signing).

Test: app_test.go
Bug: 155412211
Change-Id: If0c27c1e340c1bdb270064f636dc6bf33a0fc949
2020-05-21 13:00:46 -07:00
David Srbecky e033cbae40 Allow the user to explicitly set the java Uncompress_dex property.
ART tests need to explicitly control the compression.

Bug: 157239179
Test: "atest ArtGtestsTarget" with http://go/aog/1302773
Change-Id: I4490aa0a61fa71f830feb6a46dffd8d20fccfc66
Merged-In: I4490aa0a61fa71f830feb6a46dffd8d20fccfc66
2020-05-21 19:59:25 +01:00
Treehugger Robot 55224ccdd1 Merge "java_sdk_library: Control shared library use" am: eee58d0eed
Change-Id: I825b4244a04ede2cc999dcf14a6d7ea021bbf4b6
2020-05-21 12:21:30 +00:00
Jooyung Han 17a8699112 Merge "apex: Make android_library support APEX variants" am: 5ab5856db3
Change-Id: Ica5977558ef6b5b828ba112e64d574c518eae085
2020-05-21 12:21:23 +00:00
Treehugger Robot 9e6bbde8b1 Merge "Improve tracking of exported sdk libraries" am: 7d74b5f142
Change-Id: I079fbce6f41fb8a36063f085b423f25aa79e6952
2020-05-21 12:21:09 +00:00
Treehugger Robot eee58d0eed Merge "java_sdk_library: Control shared library use" 2020-05-21 12:14:23 +00:00
Jooyung Han 5ab5856db3 Merge "apex: Make android_library support APEX variants" 2020-05-21 12:02:39 +00:00
Treehugger Robot 7d74b5f142 Merge "Improve tracking of exported sdk libraries" 2020-05-21 12:02:05 +00:00