Commit Graph

1622 Commits

Author SHA1 Message Date
Mathieu Chartier af939a71e2 Merge "Remove option to create boot image based on preloaded classes" am: e2a8e7f0ec
am: 26f8e25cc1

Change-Id: I0d76c25c482be86090bf4666e4633ffa9059a24d
2019-06-26 09:50:37 -07:00
Mathieu Chartier d3f688b521 Revert "Remove option to create boot image based on preloaded classes"
This reverts commit 4a0473175e.

Reason for revert: NDK build broken

Change-Id: Id98bf9d5f82ed72d8c489264cf9d754e8ea1d27e
2019-06-26 16:44:38 +00:00
Mathieu Chartier e2a8e7f0ec Merge "Remove option to create boot image based on preloaded classes" 2019-06-26 15:56:36 +00:00
Paul Duffin 7aae6e7794 core_current does not include framework libraries
Bug: 134566750
Test: m droid
Change-Id: I9496a121e28fabe0c60959ac8ccea60ec4b58544
2019-06-26 14:38:00 +01:00
Paul Duffin 735d03c65c Remove unused condition in decodeSdkDep(...)
The string "core.platform.api.stubs" is never passed to the toModule
function since change I6bb6c1a0ea24437c8253dc5d8fabd37edabc9d3e.

Bug: 134566750
Test: m droid
Change-Id: Ia425a433cd762bba30be72e837fa4199580e5b6c
2019-06-26 14:37:31 +01:00
Colin Cross f5300d729e Merge "Uncompress dex in unbundled privileged apps" am: 49eb5477c7
am: d7f9313e5b

Change-Id: I2f9baa99918d5730af3f7df1fc0671d4b6644ebe
2019-06-25 18:54:13 -07:00
Mathieu Chartier 4a0473175e Remove option to create boot image based on preloaded classes
From now on, the only supported approach is to use a boot image profile.

Test: make

Change-Id: Ibd8fbd1dd81db0a7b3f3b3e626a70dcc26510224
2019-06-25 15:38:25 -07:00
Colin Cross 53a87f523b Uncompress dex in unbundled privileged apps
Mainline builds privileged apps unbundled and then uses them as
prebuilts, so they need to respect the privileged flag when
deciding whether or not to uncompress the dex.

Bug: 135772877
Test: TestUncompressDex
Change-Id: I91da7116b779ae35c0617ef77dbcb9788902370c
2019-06-25 13:36:46 -07:00
Jaewoong Jung a4d59ff0b5 Optionally embed NOTICE files in apks. am: 5b425e2e20
am: 5d48965fed

Change-Id: I533808f0eafb496c34ece9d100784ebb9b5257e6
2019-06-25 10:03:31 -07:00
Jaewoong Jung 5d48965fed Optionally embed NOTICE files in apks.
am: 5b425e2e20

Change-Id: I0397838781d5ce7ba20778706d3b0ee4936080e8
2019-06-25 09:59:31 -07:00
Jaewoong Jung 50c744e916 Merge changes from topic "apex_notice"
* changes:
  Embed NOTICE output as an APEX asset.
  Optionally embed NOTICE files in apks.
2019-06-25 16:41:16 +00:00
Jaewoong Jung 5b425e2e20 Optionally embed NOTICE files in apks.
If embed_notices or ALWAYS_EMBED_NOTICES is set, collect NOTICE files
from all dependencies of the android_app, merge them with the app's own
one (if exists), transform it to HTML, gzip it, and put it as an asset
in the final APK output.

Bug: 135460391
Test: app_test.go
Change-Id: I52d92e2fd19b3f5f396100424665c5cc344190d8
2019-06-24 19:10:22 -07:00
Paul Duffin b5be0c72ee Remove the no_framework_libs property am: 5c2f963a1d
am: 334a008188

Change-Id: I6b2d63eca5c78599115c6d9a431f22e99fe7709c
2019-06-24 16:38:34 -07:00
Colin Cross f8f6c5ed6a Merge "Allow passing --legacy in aaptflags" am: 84338df001
am: e4bcefdbee

Change-Id: Ie55ebc817c3f68612650549a8562cc72b9abe820
2019-06-24 08:56:13 -07:00
Paul Duffin 5c2f963a1d Remove the no_framework_libs property
Corrects an error message that refers to no_framework_libs.

Removes any tests that use no_framework_libs:true where possible as
there are duplicate tests for sdk_version:"core_platform". Otherwise,
switches them over to use sdk_version:"core_platform".

Bug: 134566750
Test: m droid
Change-Id: I41abe1a49f5c744e3393ca9cdf0c41888f810c9f
2019-06-24 16:03:56 +01:00
Treehugger Robot 84338df001 Merge "Allow passing --legacy in aaptflags" 2019-06-24 00:59:15 +00:00
Colin Cross 4215cfd8f9 Don't pass --legacy by default to aapt2 compile
Don't pass --legacy by default, it is rarely necessary and converts
some errors into warnings that crash at runtime.  The modules that
need it have had --legacy added to aaptflags.

Bug: 135597368
Test: m java
Change-Id: Ib05a07ead4084dd32ba28df26708d81bb53f2f2a
2019-06-22 13:04:30 -07:00
Colin Cross a0ba2f5858 Allow passing --legacy in aaptflags
--legacy will soon no longer be passed by default to all aapt2
compiles.  Allow it to be specified in aaptflags by passing it to
aapt2 compile when it is present and filtering it out from the
flags passed to aapt2 link.

Bug: 135597368
Test: m java
Change-Id: Ib65d1a9b7c32ae4ff5ab6f58e66aedfb5f296712
2019-06-22 12:59:27 -07:00
Dan Willemsen 51ff37cbb4 Fix typo in java system modules makevars am: fe310be720
am: 43ed1dbcad

Change-Id: I26bcb27fbcf43911ae636549fb21f8ff106ab817
2019-06-20 16:16:10 -07:00
Dan Willemsen fe310be720 Fix typo in java system modules makevars
This was preventing us from actually using system module dependencies
from Make.

Fixes: 135679136
Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true m legacy-performance-test-hostdex
Change-Id: Ic51c30d09cf39e35f2fe5f534a23273f450d9138
2019-06-20 10:17:35 -07:00
Dan Willemsen 7430c9df16 Merge changes from topics "rbe-deps-dexpreopt-images", "rbe-deps-system-modules" am: f8a698a0c6
am: 1a3968269d

Change-Id: Ib05695ec6e8d7fdabf4ffeca2d2f037880aad2ce
2019-06-18 16:26:19 -07:00
Dan Willemsen dbfe69e934 Depend on all the files from system modules am: ff60a73d89
am: fde13865d6

Change-Id: Ifdc822d3ae118bb3a46302f521115a0b032a0a03
2019-06-18 16:25:45 -07:00
Dan Willemsen fde13865d6 Depend on all the files from system modules
am: ff60a73d89

Change-Id: I765b9bccd7ea8a07c99a7bc360cf58405b3c966d
2019-06-18 16:08:06 -07:00
Treehugger Robot f8a698a0c6 Merge changes from topics "rbe-deps-dexpreopt-images", "rbe-deps-system-modules"
* changes:
  Expand the dexpreopt image dependencies to entire image
  Depend on all the files from system modules
2019-06-18 22:48:22 +00:00
Dan Willemsen 0f41678d00 Expand the dexpreopt image dependencies to entire image
Instead of just depending on the main .art file (boot.art, etc), also
expose the dependencies to the .oat/.vdex files (boot.oat/boot.vdex),
and all of the module files that get implicitly loading (boot-ext.*,
boot-framework.*, etc)

This is necessary for RBE, where the rule only gets the files that it
depends upon.

Test: treehugger
Test: build a system image with RBE
Change-Id: I0c7051f18582f1891d3398b46763b1521e4326c8
2019-06-18 06:40:38 +00:00
Colin Cross 15dd24bbd2 Merge "Remove SOONG_FRAMEWORK_SRCS" am: 04815d0bed
am: f347de16a4

Change-Id: I663945bbeabf4f598be794b5f113d3546c9d793e
2019-06-17 19:30:16 -07:00
Dan Willemsen ff60a73d89 Depend on all the files from system modules
Instead of just one of the files that we pass into javac.

Test: treehugger
Change-Id: I8478e88656487c9f667893d7c17839f0ea63c78f
2019-06-18 01:29:02 +00:00
Paul Duffin b3438891a0 Merge changes I42cb181f,I6413c9b1 am: 33ee25466f
am: 00c2bbb0e7

Change-Id: Icca90608b256e726a9a1bd79e9cedca1a6b53f84
2019-06-17 15:25:30 -07:00
Colin Cross 5d7409ba0f Remove SOONG_FRAMEWORK_SRCS
SOONG_FRAMEWORK_SRCS is not used in Make any more.

Test: m checkbuild
Change-Id: I61f7cdeb3d2e2fd89c8b3b302bee923624dba418
2019-06-17 14:27:15 -07:00
Paul Duffin 8fc5e62a8d Remove unused jars/sdk_version properties from java_system_modules am: 301ba52886
am: f5675d6ac3

Change-Id: Id2efcf5df5385368ce6b9a3388ee97d9ae4a9162
2019-06-17 06:46:11 -07:00
Paul Duffin 50c217c744 Add sdk_version:"core_platform" to replace no_framework_libs:true
Where possible this duplicates any tests that use no_framework_libs:true
with ones that use sdk_version:"core_platform". If not possible (e.g. in the
default targets included in java/testing.go) it switches some to use
sdk_version:"core_platform" to ensure that there is no regression in the
behavior of no_framework_libs:true.

Follow up changes will switch all usages of no_framework_libs:true over
to use sdk_version:"core_platform" at which point no_framework_libs will be
removed.

Bug: 134566750
Test: m droid

Change-Id: I42cb181f628b723c8f32a158ae4752b4c83365ae
2019-06-17 13:17:35 +01:00
Paul Duffin 301ba52886 Remove unused jars/sdk_version properties from java_system_modules
Bug: 134566750
Test: m droid
Change-Id: I2c5cd17f3f64bbde437eff65267d8c771d61e343
2019-06-17 11:21:39 +01:00
Paul Duffin a3d0986cfc Remove the no_standard_libs property
Corrects an error message that refers to no_standard_libs.

Removes any tests that use no_standard_libs:true where possible as
there are duplicate tests for sdk_version:"none". Otherwise, switches
them over to use sdk_version:"none".

The androidmk mapping from LOCAL_NO_STANDARD_LIBRARIES to
no_standard_libs has also been removed. There was little point in
updating the tool to map it through to sdk_version:"none" as there are
only a couple of places where it is used, in art's test running mk
targets and in some unbundled packages to work around some limitation
in .mk based build.

Bug: 134566750
Test: m droid
Change-Id: I6413c9b1fe3e63b93753a6a017d2981e32b7e013
2019-06-17 11:21:39 +01:00
Colin Cross ad13e1185f Merge "Support sharding robolectric tests" 2019-06-14 21:59:12 +00:00
Colin Cross 9a642dcde2 Support sharding robolectric tests
Explicitly pass the list of tests as LOCAL_ROBOTEST_FILES, and
support sharding the list of tests into multiple test runners.

Also filter out BaseRobolectricTest.java, which covers the only
use of LOCAL_ROBOTEST_FILES in Android.mk files.

Bug: 133878985
Test: m RunSettingsLibRoboTests runs the same number of tests before and after
Test: m RunSettingsLibRoboTests runs the same number of tests when sharded
Change-Id: Id85ffe03c98e722303eaa6def17812ed2244c6a6
Merged-In: Id85ffe03c98e722303eaa6def17812ed2244c6a6
2019-06-14 13:10:53 -07:00
TreeHugger Robot 92237bf1a3 Merge "Support sharding robolectric tests" into qt-dev-plus-aosp 2019-06-14 18:29:13 +00:00
Paul Duffin f45775edbe Merge "Add sdk_version:"none" to replace no_standard_libs:true" am: b11c72b0b8
am: e34bbae1ca

Change-Id: I9465a810dad7f3ea95b6c883844358d817f8cc8e
2019-06-14 01:32:45 -07:00
Paul Duffin 30b1c3046b Merge "Make sdkDep/decodeSdkDep the source of truth about the sdk" am: 60b393ce85
am: a6b64de8fd

Change-Id: I0f2404f4e9247849ef42a377d2403dea912b8e60
2019-06-14 01:31:41 -07:00
Dan Willemsen ebb0478869 Merge changes If25be604,I0a310229,I44155630 am: 42d33779cd
am: f32716e448

Change-Id: I08a9a38e59896cbec930d6087f96eaa9b327d4cc
2019-06-14 01:29:49 -07:00
Paul Duffin 20cd7ec026 Add hiddenapi_flags module type am: 1b033f5c4c
am: 8d5bfad7ec

Change-Id: I5038dbffacc4cd1e52b5e5eba7c698b4c4a4d190
2019-06-14 01:24:48 -07:00
Paul Duffin b11c72b0b8 Merge "Add sdk_version:"none" to replace no_standard_libs:true" 2019-06-14 06:29:48 +00:00
Paul Duffin 60b393ce85 Merge "Make sdkDep/decodeSdkDep the source of truth about the sdk" 2019-06-14 06:26:02 +00:00
Colin Cross d2d1177168 Support sharding robolectric tests
Explicitly pass the list of tests as LOCAL_ROBOTEST_FILES, and
support sharding the list of tests into multiple test runners.

Also filter out BaseRobolectricTest.java, which covers the only
use of LOCAL_ROBOTEST_FILES in Android.mk files.

Bug: 133878985
Test: m RunSettingsLibRoboTests runs the same number of tests before and after
Test: m RunSettingsLibRoboTests runs the same number of tests when sharded
Change-Id: Id85ffe03c98e722303eaa6def17812ed2244c6a6
2019-06-13 15:19:03 -07:00
Paul Duffin 52d398a841 Add sdk_version:"none" to replace no_standard_libs:true
Where possible this duplicates any tests that use no_standard_libs:true
with ones that use sdk_version:"none". If not possible (e.g. in the
default targets included in java/testing.go) it switches some to use
sdk_version:"none" to ensure that there is no regression in the
behavior of no_standard_libs:true.

Follow up changes will switch all usages of no_standard_libs:true over
to use sdk_version:"none" at which point no_standard_libs will be
removed.

Bug: 134566750
Test: m droid
Change-Id: I5f0fd3daa980f6b223abe454cba7f25a97a39d7a
2019-06-13 19:15:10 +01:00
Treehugger Robot 42d33779cd Merge changes If25be604,I0a310229,I44155630
* changes:
  Add another jar used by kotlinc
  Actually depend on the headers from renderscript
  Fix a few missing dependencies in APEX building
2019-06-13 17:40:01 +00:00
Paul Duffin 250e6198d4 Make sdkDep/decodeSdkDep the source of truth about the sdk
Previously, different parts of the build used different sources of
information about the SDK (i.e. the default libraries) against which
a Java module aimed at the device was built. Some used the sdk_version
property, others used the no_standard_libs or no_framework_libs, some
used a combination of all three.

That lead to inconsistent handling in the code, e.g. some parts treated
no_standard_libs: true as implying no_framework_libs: true and others
did not, and also in the build files, e.g. some modules specified
no_framework_libs: true and sdk_version: "system_current" which makes
no sense, or no_standard_libs: true and sdk_version: "core_current"
which are inconsistent.

This is the first step in a refactoring to simplify the sdk selection
process by replacing the no_standard_libs/no_framework_libs properties
with some extra options for the sdk_version property. This change
consists of:
1) Extra functions sdkContext to access the no_standard_libs and
   no_framework_libs properties.
2) Extra field/functions in sdkDep to store and access the value of
   no_standard_libs/no_framework_libs.
3) Changes to decodeSdkDep(...) to pass the values of the no_...
   properties through to the returned sdkDep.
4) Change all code that accesses the no_... properties directly to
   call decodeSdkDep(...) to get an sdkDep object and then accessing
   the values of the no_... properties from there.

The accessor functions on sdkDep are called has...() rather than
no...() as most callers of the methods invert the value anyway and
!no...() is harder to reason about than has...().

The hasFrameworkLibs() function returns true if and only if
no_standard_libs and no_framework_libs are false. That is consistent
with all but one usage of the no_framework_libs property and that is
not affected by it.

Bug: 134566750
Test: m droid
Change-Id: I196e3304e8bd802fb154e897397b0dd337f868e2
Exempt-From-Owner-Approval: Colin has already given +2 modulo some
    minor nits and this blocking other changes.
2019-06-13 15:16:32 +01:00
Paul Duffin 1b033f5c4c Add hiddenapi_flags module type
The build generates a file out/soong/hiddenapi/hiddenapi-flags.csv
which is used by the hiddenapi-blacklist tests in cts/tests/signature.
The generation is done at the ninja level and so is not accessible from
the soong layer that runs on top. This change adds the hiddenapi-flags
module type which makes the file accessible from other soong modules.

Bug: 122332514
Test: atest -p cts/tests/signature
Change-Id: If38c8a8ffca110f2ae01f97f19a2740ca3fde1b7
Exempt-From-Owner-Approval: Colin has already reviewed and only had minor
    nits and this is blocking other changes.
2019-06-13 10:25:47 +01:00
Paul Duffin 065000e3f5 Merge "Never allow java_library_host with no_standard_libs: true" am: 393590d8a8
am: 3321670746

Change-Id: Iebd7f4cd4979860ea1b2f9433373546c114d2160
2019-06-13 00:17:11 -07:00
Paul Duffin a14f280cb0 Merge "Allow java_test.go tests to use any Android.bp file" am: 45656aacab
am: e6cb60da57

Change-Id: I0fedcef906e6e59e004115d421df1a152348a02c
2019-06-13 00:16:57 -07:00
Paul Duffin ee9d72d0c8 Merge "Add test for no_framework_libs:true" am: 5b775ae8b4
am: c064604439

Change-Id: I55673fa177754b1d44e5d3d4802e2c64e11a7098
2019-06-13 00:16:42 -07:00
Paul Duffin 393590d8a8 Merge "Never allow java_library_host with no_standard_libs: true" 2019-06-13 06:57:19 +00:00
Paul Duffin 45656aacab Merge "Allow java_test.go tests to use any Android.bp file" 2019-06-13 06:56:56 +00:00
Paul Duffin 5b775ae8b4 Merge "Add test for no_framework_libs:true" 2019-06-13 06:56:25 +00:00
Dan Willemsen 1cfbdbe1b2 Add another jar used by kotlinc
Bug: 130111713
Test: treehugger
Change-Id: If25be6047625cec4ed9802142876cfd8e9ccd3eb
2019-06-13 05:22:03 +00:00
Colin Cross ce051256f8 Merge changes I89ad92f3,Ife1604c0 am: e51e2feafd
am: 4fb5563c20

Change-Id: Ib4c518190bc28f0d67469f9dcdc6d2b72e64072c
2019-06-12 21:06:54 -07:00
Colin Cross e51e2feafd Merge changes I89ad92f3,Ife1604c0
* changes:
  Don't add dependencies on uses-library modules in unbundled builds
  Add implicit outputs to ErrorRule rules
2019-06-13 03:36:08 +00:00
Colin Cross 31de2eaf51 Merge changes Ia17b2bcb,Ic71892c3,Id2b23b9e,I435ee7aa,I85112506, ... am: 72ea641dff
am: 98a6f300fa

Change-Id: I84683c2204afb5792ec11e2c608dca288e9431ec
2019-06-12 13:52:07 -07:00
Colin Cross 3245b2cb83 Don't add dependencies on uses-library modules in unbundled builds
Unbundled builds may not have definitions of shared libraries, and
they are not dexpreopted so the dependencies are not used anyways.

Test: manual
Change-Id: I89ad92f3b073422734f824ac3a8a3b9baf995ccb
2019-06-12 20:20:21 +00:00
Colin Cross 72ea641dff Merge changes Ia17b2bcb,Ic71892c3,Id2b23b9e,I435ee7aa,I85112506, ...
* changes:
  Consolidate *MutatorContext and ModuleContext into BaseModuleContext
  Add test for missing defaults modules with AllowMissingDependencies
  Capture missing dependency error rules
  Share buildDir for android/soong/android tests
  Reimplement AddMissingDependencies
  Add GenerateAndroidBuildActions to DefaultsModuleBase
2019-06-12 20:19:55 +00:00
Alexander Smundak c98ec46440 Merge "Tune JVM, print full diagnostics on crash." am: 90aa101152
am: 8975b8f376

Change-Id: I85865160062d8ced76a239e9e5becbeff92227c9
2019-06-12 09:06:07 -07:00
Alexander Smundak 90aa101152 Merge "Tune JVM, print full diagnostics on crash." 2019-06-12 15:33:06 +00:00
Paul Duffin b815ada8c0 Never allow java_library_host with no_standard_libs: true
This combination makes no sense.

Bug: 134566750
Test: m droid
Change-Id: Ib37bbac165395c003d23225e0469ba60fa6a56ea
2019-06-12 14:08:13 +01:00
Paul Duffin baccf7e122 Allow java_test.go tests to use any Android.bp file
Previously, the tests had to use the Android.bp file in the root
directory of the mock file system. That prevented adding tests that are
dependent on the location of the Android.bp file, e.g. ones that use
no_standard_libs. This change will process any Android.bp in the mock
filesystem.

Bug: 134566750
Test: m
Change-Id: I6fb057a473a18e87bd1a89507e78ceb3fd171eb5
2019-06-12 14:08:13 +01:00
Paul Duffin fad7980075 Add test for no_framework_libs:true
Bug: 134566750
Test: m droid
Change-Id: Ie3c5c0730d4505c7932952eb20b5ccafd806a73a
2019-06-12 14:08:13 +01:00
Paul Duffin eb872e1a90 Remove unnecessary use of sdk_version: "core_current" am: b826a2f269
am: 9ec3254d13

Change-Id: I616493b78c283976a5eee06a304e8aaa5050d0fc
2019-06-12 03:11:59 -07:00
Paul Duffin b826a2f269 Remove unnecessary use of sdk_version: "core_current"
Modules that specify no_standard_libs: true should not specify the
sdk_version property as well because the former supercedes the latter.

Bug: 134566750
Test: m
Change-Id: I1d8663dc3a25baf23a1b136c7f35cf130cd7543b
2019-06-12 10:50:24 +01:00
Sasha Smundak 26c6d9e9fb Tune JVM, print full diagnostics on crash.
JVM occasionally (0.5% time) crashes on entering a method with SIGSEGV.
It might be due to excessive load on the host machine. Reduce the number
of the compiler threads to 6, and do not start all the GC threads
immediately. If JVM crashes, copy full diagnostics to stderr.

Bug: 132766811
Test: treehugger
Change-Id: Ib7bfd568f6d32456bf623cbb615ffc990c326a34
2019-06-11 13:30:13 -07:00
Pete Gillin dac578df15 Merge "Don't specify -encoding twice in Jdiff javadoc invocations." am: a53ae43180
am: 071d0d6799

Change-Id: Idb949aba99ca1aaae7bd10bb713b43d2d0669777
2019-06-11 04:36:42 -07:00
Pete Gillin a53ae43180 Merge "Don't specify -encoding twice in Jdiff javadoc invocations." 2019-06-11 11:21:37 +00:00
Dan Willemsen 7488174f2c Merge "Refactor .aar resource compilation" am: 588857b418
am: 2758050dc4

Change-Id: I98dfbdbef71972a040fd53f9e77eb321fb6f5e0e
2019-06-10 21:16:55 -07:00
Treehugger Robot 588857b418 Merge "Refactor .aar resource compilation" 2019-06-11 04:03:51 +00:00
Colin Cross 59037628f4 Add GenerateAndroidBuildActions to DefaultsModuleBase
Add an empty GenerateAndroidBuildActiosn to DefaultsModuleBase
so that every defaults module doesn't need to provide one.  This
will also allow adding an implementation in the next patch.

Test: m checkbuild
Change-Id: I13554bdb3a287c2f18e1efab74d4f08a1ba8620c
2019-06-10 13:51:17 -07:00
Colin Cross 9d5d72f7a6 Merge changes I9f8df94f,I2d7f5c56,I0ebb7381,Ieefcfc1a am: a6bf56d4be
am: 236ac108f5

Change-Id: Ia0777130add15aceb17739f5dcb613ca4e1bf172
2019-06-10 10:00:33 -07:00
Colin Cross a6bf56d4be Merge changes I9f8df94f,I2d7f5c56,I0ebb7381,Ieefcfc1a
* changes:
  Consolidate *MutatorContext and ModuleContext into BaseModuleContext
  Consolidate baseContext, BaseContext, and BaseModuleContext
  Rename ModuleBase receivers
  Remove repetition in android package names
2019-06-10 16:38:11 +00:00
Pete Gillin 2b1ea2edb3 Don't specify -encoding twice in Jdiff javadoc invocations.
The option '-encoding UTF-8' is included in the opts defined at L1754,
which are passed to transformJdiff (defined at L1594), and from there
to a javadoc rule (defined at L29), where they are included in a
command line string which already has '-encoding UTF-8' in it. The
result is that this appears twice in the command line. This is
apparently ignored by the version of javadoc currently used. Later
upstream versions of javadoc, however, fail with the error 'javadoc:
error - The -encoding option may be specified no more than once.'

Test: make system-api-stubs-docs
Test: make system-api-stubs-docs, using an OpenJDK 11 toolchain via OVERRIDE_ANDROID_JAVA_HOME
Bug: 131683177
Change-Id: Ib9382ada3c8259edfacb2be3ab14d4c09d8753a7
2019-06-10 14:37:41 +01:00
Pete Gillin 24312aff67 Merge "Disable the system-modules plugin for jlink invocations." am: 14bb14e0c3
am: 8db09b5fff

Change-Id: Ib2c2474df19faf813f21fcda1309eb59356aaf2d
2019-06-07 03:47:41 -07:00
Pete Gillin 14bb14e0c3 Merge "Disable the system-modules plugin for jlink invocations." 2019-06-07 10:35:56 +00:00
Colin Cross 0ea8ba82fc Consolidate baseContext, BaseContext, and BaseModuleContext
blueprint.BaseModuleContext is the set of methods available to all
module-specific calls (GenerateBuildActions or mutators).  The
android package split the same functionality across baseContext (nee
androidBaseContext), BaseModuleContext, and BaseContext.
Consolidate all of them into android.BaseModuleContext.

Test: m checkbuild
Change-Id: I2d7f5c56fd4424032cb93edff6dc730ff33e4f1e
2019-06-06 20:01:31 -07:00
Pete Gillin 4eb6be32f6 Disable the system-modules plugin for jlink invocations.
This jlink plugin is intended to optimise startup times for Java
runtimes by embedding a pre-processed and pre-validated module graph
in the system image.

This provides no benefit on Android, since the Android runtime does
not make use of the module graph it produces. (It doesn't seem useful
on Android anyway, since the system image only contains one module,
namely java.base.)

Furthermore, the plugin causes the jlink invocation to fail when using
the jlink tool from OpenJDK 11. The issue here is the plugin uses
classes in the jdk.internal.module package to describe the module
graph; that package is not part of libcore and therefore not listed in
the module-info.java for java.base on Android; but the plugin has the
side-effect of adding the package to java.base; this causes jlink to
subsequently fail with an error "Module java.base's descriptor
indicates the set of packages is : <lots of packages>, but module
contains packages: <same packages plus jdk.internal.module>". (The
implementation of the plugin changed significantly in OpenJDK 10,
which is presumably why this issue does not occur using OpenJDK 9's
jlink.)

Therefore, it is safe and beneficial to disable the plugin.

Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make core-all-system-modules, using an OpenJDK 11 toolchain via OVERRIDE_ANDROID_JAVA_HOME and changing the jmod create invocation to use --module-version 11
Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make droid, flash to device & sanity check
Bug: 131683177
Change-Id: I52333f32c88aa85cd3652ad91d50d9927ff61daf
2019-06-06 18:59:46 +01:00
Neil Fuller d2748ca146 Merge "Use correct system_modules with core.current.stubs" am: 6d376a0de8
am: c9d38ec5e0

Change-Id: Id00fd788879e6fc5f5146925161d10d2a1989ab9
2019-06-06 09:18:02 -07:00
Treehugger Robot 6d376a0de8 Merge "Use correct system_modules with core.current.stubs" 2019-06-06 16:05:16 +00:00
Jaewoong Jung c0ed71ccf8 Merge "Touch up manifest if there's no source code." am: 96eac767df
am: c831a0a895

Change-Id: I19cba0c3017eff6f309dae04aacdb7e0aee1613d
2019-06-06 07:18:38 -07:00
Jaewoong Jung 96eac767df Merge "Touch up manifest if there's no source code." 2019-06-06 13:52:37 +00:00
Neil Fuller ba88c41274 Use correct system_modules with core.current.stubs
The system_modules defn used with core.current.stubs
was core-system-modules which doesn't match. Instead,
this change uses core-current-stubs-system-modules.

Test: build
Change-Id: Ifb9e77b02bbb04c1cb39c6b9f97932c20d44d8ba
2019-06-06 14:15:00 +01:00
Jaewoong Jung 6a98d5d59b Merge "android_app stl property bug fix" am: 4f67c42d76
am: 58d0f0cf69

Change-Id: Ic14f463f27b8413e0d4960658c41407763d79ba6
2019-06-05 13:47:32 -07:00
Jaewoong Jung 4f67c42d76 Merge "android_app stl property bug fix" 2019-06-05 20:16:13 +00:00
Colin Cross f6a2a5b960 Merge "Add .jar tag to java modules" am: ac1d267368
am: edff7ed8da

Change-Id: I19059e05178a72ef07e205e97e528fe9f74c41b2
2019-06-05 12:58:50 -07:00
Colin Cross d6e75e4ef9 Merge "Support tagged module references" am: b4c35f3378
am: a360b2b335

Change-Id: I61cff6302236ed5c67b86682563eaeae9d0e3363
2019-06-05 10:34:40 -07:00
Jimmy Chen cc4923a063 Merge "Revert "Revert "Revert "Print full diagnostics file when Java process crashes."""" am: 7c9689f7b7
am: 3e0d465e8b

Change-Id: I378ddb41a37ef4274b11e97823e4495cf0536480
2019-06-05 03:17:18 -07:00
Treehugger Robot 7c9689f7b7 Merge "Revert "Revert "Revert "Print full diagnostics file when Java process crashes."""" 2019-06-05 09:53:22 +00:00
Jimmy Chen e88eaa7db7 Revert "Revert "Revert "Print full diagnostics file when Java process crashes."""
This reverts commit b4be092855.

Reason for revert: break build

Change-Id: I11fc5eb5f635a5d99eba962f5817851629e50ab2
2019-06-05 06:47:11 +00:00
Alexander Smundak 8d08aa2cdc Merge "Revert "Revert "Print full diagnostics file when Java process crashes.""" am: 22d3d6ba5c
am: 439ef91ee5

Change-Id: Ibd71d3e71449330b3cdd3d9505eeea0c8bf0f9cc
2019-06-04 17:51:29 -07:00
Jaewoong Jung 710756a6ff android_app stl property bug fix
When it is set to c++_shared, the added dependency should be
libc++_shared, not libc++.

Fixes: 130891985
Test: app_test.go, atest 'CtsNdkBinderTestCases' w/ conversion CL
Change-Id: I0e50e0d5bf511aa6e52d16cd715a185721011255
2019-06-04 12:36:00 -07:00
Colin Cross 375ca3c680 Add .jar tag to java modules
Allow java modules to be referenced as ":module{.jar}" to get
the classes .jar.

Bug: 122333007
Test: m checkbuild
Change-Id: I2d07f774ae8ed5a39206059c4102727c6802d26e
2019-06-04 10:22:55 -07:00
Colin Cross 41955e8895 Support tagged module references
There are cases where a module needs to refer to an intermediate
output of another module instead of its final output.  For example,
a module may want to use the .jar containing .class files from
another module whose final output is a .jar containing classes.dex
files.  Support a new ":module{.tag}" format in any property that
is annotated with `android:"path"`, which will query the target
module for its ".tag" output(s).

Test: path_properties_test.go, paths_test.go
Test: no unexpected changes in build.ninja
Change-Id: Icd3c9b0d83ff125771767c04046fcffb9fc3f65a
2019-06-04 10:22:51 -07:00
Treehugger Robot 22d3d6ba5c Merge "Revert "Revert "Print full diagnostics file when Java process crashes.""" 2019-06-04 17:16:10 +00:00
Jaewoong Jung c27ab6678b Touch up manifest if there's no source code.
The new package manager behavior requires packages without source code
to have an application element with hasCode attribute set to false in
their manifest. With this change, Soong can now automatically insert one
for codeless apps.

Test: app_test.go, manifest_fixer_test.py
Fixes: 124375490
Change-Id: Ied89a8d07c63805ab910859a4f7c45fc1c60bb73
2019-06-03 10:51:42 -07:00
Alexander Smundak b4be092855 Revert "Revert "Print full diagnostics file when Java process crashes.""
This reverts commit d71dc6b5e0.

Reason for revert: ag/974065 fixes the problem that caused the revert

Change-Id: I3ba9eecdab34602aaf19fa518520ac932c9b97af
2019-06-03 16:53:22 +00:00
Alexander Smundak 2ca7d3ca58 Merge "Revert "Print full diagnostics file when Java process crashes."" am: d5dd534465
am: 62459d6586

Change-Id: Ibd9278cfcf0f20e3188da07d2cc6e61eb5bba50f
2019-05-31 02:56:34 -07:00
Treehugger Robot d5dd534465 Merge "Revert "Print full diagnostics file when Java process crashes."" 2019-05-31 09:37:36 +00:00
patricktu 88b829983c Merge "AIDEGen: Collect the srcjar into out/soong/module_bp_java_deps.json" am: b023fe382b
am: 0fd9fb5299

Change-Id: I7b29c01628ae43cbd0463ac6ebe1746538399b69
2019-05-30 22:48:02 -07:00
Treehugger Robot b023fe382b Merge "AIDEGen: Collect the srcjar into out/soong/module_bp_java_deps.json" 2019-05-31 05:29:15 +00:00
Colin Cross 7e5bf1cc8c Merge "Make test_options.timeout an int64" am: 76acdadaf7
am: acb00184c3

Change-Id: Id7a50b086ce755877e2656c98b5be8896b456bfd
2019-05-30 20:24:06 -07:00
Alexander Smundak d71dc6b5e0 Revert "Print full diagnostics file when Java process crashes."
This reverts commit 9d6df2246c.

Reason for revert: This change set the value of JAVA make variable to a string containing "foo bar". When soong_ui is asked to evaluate such string, it drops the quotes, causing bash to treat 'foo' and 'bar' as separate command line arguments.

Change-Id: If4e3c4c950c305bb67a572de3d86119c2da81dc1
2019-05-31 03:15:55 +00:00
Colin Cross 76acdadaf7 Merge "Make test_options.timeout an int64" 2019-05-31 03:11:22 +00:00
Colin Cross 4f3124ee1c Merge "Port uses-shared library verification and dexpreopting to Soong" am: 7a1fefc2de
am: 38ec6cfbf4

Change-Id: Ib9bbb720605f418d242aba98df9d9904671c29e4
2019-05-30 15:04:09 -07:00
Treehugger Robot 7a1fefc2de Merge "Port uses-shared library verification and dexpreopting to Soong" 2019-05-30 21:50:31 +00:00
Sasha Smundak 9040ad7d49 Merge "Print full diagnostics file when Java process crashes." am: 7b1ca80579
am: 534d99369c

Change-Id: If3406f23f2f8048ed0872fd1b071fac31b138ec3
2019-05-30 14:43:10 -07:00
Treehugger Robot 7b1ca80579 Merge "Print full diagnostics file when Java process crashes." 2019-05-30 21:16:52 +00:00
Colin Cross 2f9a7c8ab0 Make test_options.timeout an int64
I forgot we supported integer properties, use an integer instead
of a string for test_options.timeout.

Test: m checkbuild
Change-Id: I22d3135b31ec93d15b530c430b9e9cda6dd3f416
2019-05-30 11:19:32 -07:00
Colin Cross 50ddcc4b69 Port uses-shared library verification and dexpreopting to Soong
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for
preopt with uses-libraries) from Make to Soong to support verifying
and preopting shared libraries.

This reapplies Id25f55f07a55120bebe2a9b32c094209efc85c8b with fixes
for unbundled builds and builds with ALLOW_MISSING_DEPENDENCIES=true
set.

Bug: 132357300
Test: app_test.go
Test: m checkbuild
Change-Id: I964309a68ec4ed081f3f3154879c71048ecb5455
2019-05-29 19:11:26 -07:00
Sasha Smundak 9d6df2246c Print full diagnostics file when Java process crashes.
Bug: 132766811
Test: treehugger
Change-Id: I8cca2486f2194a8643007a53e4a695d2a18abbf8
2019-05-29 17:46:22 -07:00
Dan Willemsen 304cfec778 Refactor .aar resource compilation
Instead of extracting the aar, and passing the res directory to another rule
(along with a dependency to a different known file), don't keep the
extracted res directory, and pass the aar directly to the resource
compliation rule, which will extract just the res directory.

I need this for my RBE experiments, where non-listed output files won't
exist in other rules.

Test: m
Change-Id: I99074381052cbcebb6a402484abae9ab2e40284f
2019-05-29 16:54:43 -07:00
Colin Cross 11a19ed1cc Merge "Revert "Port uses-shared library verification and dexpreopting to Soong"" am: 7d06395f0c
am: cc50c0c4de

Change-Id: I4e12ee0f7d2dbb293e492c55f2eae66dc9638266
2019-05-29 13:55:14 -07:00
Colin Cross 7d06395f0c Merge "Revert "Port uses-shared library verification and dexpreopting to Soong"" 2019-05-29 20:34:10 +00:00
Colin Cross c032498336 Revert "Port uses-shared library verification and dexpreopting to Soong"
This reverts commit b66d7b1c20.

Reason for revert: broke unbundled builds

Change-Id: I96ae287885107079de4a26e6b100ad8ed66961c0
2019-05-29 20:28:47 +00:00
Colin Cross 7cb1d9c5e2 Merge changes from topic "verify_uses_libraries" am: 2f4c55e9f7
am: 3c8e809052

Change-Id: I9bd1e0d745c605b3617576f9a6044527421fbfe4
2019-05-29 11:32:23 -07:00
Treehugger Robot 2f4c55e9f7 Merge changes from topic "verify_uses_libraries"
* changes:
  Port uses-shared library verification and dexpreopting to Soong
  Move verify_uses_libraries.sh out of dexpreopt
2019-05-29 18:09:01 +00:00
Tobias Thierer 76b62e1596 Merge "Support defaults properties in java_system_module" am: 4b06c20215
am: 9d4e40ea2d

Change-Id: Ib0c4bcfcaf527ff48f21a929deb9fc4666208a92
2019-05-29 04:26:33 -07:00
Tobias Thierer 4b06c20215 Merge "Support defaults properties in java_system_module" 2019-05-29 11:09:01 +00:00
Colin Cross 9b61c51463 Merge "Document escaping" am: 89574e0c40
am: 2d119ed870

Change-Id: Ibfd5a1935105334c3b042883a9c5a3cf10c710a4
2019-05-28 18:39:24 -07:00
Colin Cross 979a72c484 Don't build hiddenapi flags or encode dex for unbundled builds am: 9c74a1ee85
am: 4bccc0801c

Change-Id: I392327c382162d537e4d0c577f48e2c8acfe14c0
2019-05-28 18:29:59 -07:00
Colin Cross 89574e0c40 Merge "Document escaping" 2019-05-29 01:28:02 +00:00
Colin Cross 9c74a1ee85 Don't build hiddenapi flags or encode dex for unbundled builds
Builds with TARGET_BUILD_APPS shouldn't build the hiddenapi flags
or encode dex files even if frameworks/base exists.

Bug: 133343287
Test: mainline modules build
Change-Id: I0647451420fd09bb680808b35e1ad3b8f514ba46
2019-05-28 21:48:54 +00:00
Colin Cross 667ffa192f Support defaults properties in java_system_module
Test: none
Change-Id: I08e5c39690b3c9960dc5e99c4b866a2523c9eafb
2019-05-28 20:36:46 +00:00
Colin Cross b66d7b1c20 Port uses-shared library verification and dexpreopting to Soong
Ports 09f3b97f4b488cd3a7b7d72038b173575b02c162 (Add support for
preopt with uses-libraries) from Make to Soong to support verifying
and preopting shared libraries.

Bug: 132357300
Test: app_test.go
Test: m checkbuild
Change-Id: Id25f55f07a55120bebe2a9b32c094209efc85c8b
2019-05-28 11:20:09 -07:00
Colin Cross e4a0584f60 Document escaping
Document that strings can contain double quotes escaped as \", and
the droiddoc args argument can contain a dollar signe escaped as $$.

Test: none
Change-Id: I91d3fa73f484094c9ce8cbecc93189850856de84
2019-05-28 10:19:31 -07:00
Colin Cross 67999a12d5 Merge changes If15abf79,Iaae177ef am: ff3f43857f
am: 45cc967424

Change-Id: I4b322e79f5177131cd35ae7b943a008fa26c95e2
2019-05-28 09:58:26 -07:00
patricktu 18c82ffea7 AIDEGen: Collect the srcjar into out/soong/module_bp_java_deps.json
Build module_bp_java_deps.json without this change:
Build time: 3m53.761s
File size: 12,955,363 Bytes

Build module_bp_java_deps.json with this change:
Build time: 3m49.106s
File size: 13,361,647 Bytes

Bug: 132407603
Test: 1. SOONG_COLLECT_JAVA_DEPS=false make nothing
      2. SOONG_COLLECT_JAVA_DEPS=true make nothing
      3. Check module_bp_java_deps.json in /out/soong.
         In SettingsProvider section there should contain
         "srcjars": [
             "out/soong/.intermediates/frameworks/base/packages/SettingsProvider/SettingsProvider/android_common/gen/R.jar"
         ]

Change-Id: I800a4d4f13b280d7ef87005e599cbd0aaf8c93f4
2019-05-27 11:34:10 +00:00
Colin Cross 7211910fd0 Add manifest_check tool
Add a tool that can check that the <uses-library> tags in an
AndroidManifest.xml file match a list provided by the build.

Bug: 132357300
Test: manifest_check_test
Change-Id: If15abf792282bef677469595e80f19923b87ab62
2019-05-24 13:43:27 -07:00
Colin Cross 4af387c20e Move manifest_fixer to a python_binary_host module
In preparation for making it use multiple files so that some
implementation can be shared with a new tool.

Also make manifest_fixer_test a python_test_host, and add it
to TEST_MAPPING.

Test: m checkbuild
Change-Id: Iaae177efcb978187b126d90359b82cdfd3176857
2019-05-24 13:43:19 -07:00
Colin Cross 2a25d0dfab Merge "Add <uses-library> tags for SDK libraries to AndroidManifest.xml" am: f0cbace3b2
am: a5a6493eaf

Change-Id: Id005856bc1ed23289911c10b6240727e36cf702f
2019-05-24 11:19:14 -07:00
Colin Cross 5446e88657 Add <uses-library> tags for SDK libraries to AndroidManifest.xml
Port I4e7a9bdc5bf845af85168abf55f8063900bacc72 and
Ieb7c1429077aaf6899e214a217d9455d95dbfea6 from Make to Soong to
support adding <uses-library> tags to AndroidManifest.xml for
transitive java_sdk_library dependencies and android.test.base
and android.test.mock.

Fixes: 133306356
Test: m checkbuild
Change-Id: I23763bb689c474d25d04a418df1c46e7f0d807af
2019-05-24 13:39:26 +00:00
Jaewoong Jung 029614c7dd Merge "Add stl property to android_app." am: ace17d35fd
am: c2e1b07e1c

Change-Id: I3c3e9fdf24aae4bb3ada25665580afcd61bdadd2
2019-05-23 22:13:27 -07:00
Jaewoong Jung ace17d35fd Merge "Add stl property to android_app." 2019-05-23 20:55:42 +00:00
Colin Cross 28d8dc1392 Merge "Add kotlin-stdlib-jdk8 when using Kotlin" am: 6be6c2e4c5
am: 10077730ed

Change-Id: I8199cfe2fa1ea8305774357b65115a288f3446d9
2019-05-21 15:43:23 -07:00
Colin Cross 6be6c2e4c5 Merge "Add kotlin-stdlib-jdk8 when using Kotlin" 2019-05-21 18:11:59 +00:00
Pete Gillin 4052fab263 Merge "Avoid targeting Java 9 for targets with SDK version up to 29." am: 3f3a70c0ec
am: 4494c12c46

Change-Id: I3b351483e18c6ffd9fb5952148bd17c8ed31cbbd
2019-05-21 03:42:36 -07:00
Pete Gillin 3f3a70c0ec Merge "Avoid targeting Java 9 for targets with SDK version up to 29." 2019-05-21 10:19:06 +00:00
Pete Gillin 9c64014102 Avoid targeting Java 9 for targets with SDK version up to 29.
Targets with sdk_version values up to and including 29 should not use
Java language level 9, even if EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true
is set.

This change fixes a downstream issue.

Bug: 131678633
Test: EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true make droid tests docs cts java
Test: (same test in downstream branch)
Change-Id: Ic58e8df2e06d6e07bc42255314521831dc41b239
2019-05-20 15:48:19 +01:00
Jaewoong Jung ad592e79cd Merge "Turn off dex actions for sourceless modules." am: 4c83b8950a
am: 7f23cee285

Change-Id: I97f645cb4adfbaa9fab4da1a9dfdff66c997a100
2019-05-16 13:30:37 -07:00
Jaewoong Jung bc625cd942 Add stl property to android_app.
The flag is a Soong version of LOCAL_NDK_STL_VARIANT in apps and app
tests. Unlike in the case of cc_library and its siblings, the only
meaningful value for the make var when it's used in apps is
'c++_shared', in which case we add additional dependency to libc++.

Fixes: 130891985
Test: app_test.go + CtsNdkBinderTestCases
Change-Id: I83f45d375742164fff7f160a734b0686e56b5c38
2019-05-16 13:16:15 -07:00
Jaewoong Jung 4c83b8950a Merge "Turn off dex actions for sourceless modules." 2019-05-16 18:01:48 +00:00
Jaewoong Jung b16dc74729 Merge "Fix override_android_app dependency issues." am: 105920a792
am: ac5ee3559f

Change-Id: Ie6447241cc069f507d053e10d78ba540d9cc84f9
2019-05-16 08:31:45 -07:00
Jaewoong Jung 105920a792 Merge "Fix override_android_app dependency issues." 2019-05-16 15:07:13 +00:00
Sundong Ahn 630a92b22a Merge "Add No_dist property" am: f50406eecc
am: 2c7bf1f4a3

Change-Id: I21e618250034b46996f4c0a2a127a41913e72c6d
2019-05-15 20:58:24 -07:00
Treehugger Robot f50406eecc Merge "Add No_dist property" 2019-05-16 01:25:53 +00:00
Jaewoong Jung a24af3ba20 Turn off dex actions for sourceless modules.
Test: dexpreopt_test.go
Fixes: 129370564
Change-Id: Ic292f37c4f782b14fce625b85817b58c31d3f276
2019-05-15 15:46:26 -07:00
Jaewoong Jung b639a6adb2 Fix override_android_app dependency issues.
This change fixes an issue where an android_test could not depened on an
override_android_app or an android_app overridden by one by moving all
override processing to post-deps and forwarding incoming dependencies on
override_android_apps to base android_app modules

Fixes: 132447700
Test: app_test.go
Change-Id: I4ac593be661f541f5ea9823ef97373bee4b186f9
2019-05-15 12:11:18 -07:00
Colin Cross 0b03d9701b Add kotlin-stdlib-jdk8 when using Kotlin
kotlin-stdlib-jdk8 contains extensions to the Kotlin standard library
for use when targeting Java language level 8.

Test: m checkbuild
Change-Id: Iac5f977f9080d8e0e2402b08a992a93c909744e9
2019-05-15 17:38:11 +00:00
Sasha Smundak a35326ccc7 manifest_fixer argument should be --use-embedded-dex rather than --use-embedded-dex=true am: d2e5361c90
am: f293509714

Change-Id: I525e1041b6bbb59d133804c0b852fc3f1cbd93f9
2019-05-14 22:05:50 -07:00
Sundong Ahn 80a87b3309 Add No_dist property
For the sysprop apis, we don't need dist. So the No_dist property is
added for it.

Bug: 132448761
Test: m -j dist
Change-Id: I51c6a6b87ab9dc90b6825c0d4d414e958dd7b265
2019-05-15 12:20:03 +09:00
Sasha Smundak d2e5361c90 manifest_fixer argument should be --use-embedded-dex rather than --use-embedded-dex=true
Test: building soong tests, treehugger
Change-Id: Id0df92171a2e547794979fb473d8abc47f33d13c
2019-05-14 17:03:24 -07:00
Jaewoong Jung a0af8c069e Merge "Fixes typos in device_host_converter.go comments." am: bc975e8b89
am: 1d5d99d652

Change-Id: I56c54e37b169b6c8a19ed5b78b41813e03b613f0
2019-05-13 18:38:13 -07:00
Treehugger Robot bc975e8b89 Merge "Fixes typos in device_host_converter.go comments." 2019-05-14 01:16:27 +00:00
Jaewoong Jung 707d788ea2 Fixes typos in device_host_converter.go comments.
Test: TreeHugger
Change-Id: Ie786e8fc950c3e9913c9d51f2b88bc036bb17462
2019-05-13 15:11:23 -07:00
Colin Cross c45fc2c217 Merge "Don't hide *.kotlin_module in turbine dependencies" am: f3e802bf0d
am: 9a7ee9da1b

Change-Id: Ie8784cf6f9fbc0d111a38065858479ff8bd5a8a4
2019-05-13 14:00:33 -07:00
Treehugger Robot f3e802bf0d Merge "Don't hide *.kotlin_module in turbine dependencies" 2019-05-13 20:21:47 +00:00
Jaewoong Jung 50dd31373d Merge "Uncompress dex file in imported apk when needed." am: b7cb607812
am: 142ec3bf4a

Change-Id: Ic461594d603dbbcc995caa23ec072f1d0be1d0b6
2019-05-13 11:13:23 -07:00
Jaewoong Jung b7cb607812 Merge "Uncompress dex file in imported apk when needed." 2019-05-13 17:54:00 +00:00
Pete Gillin dc512d55ce Merge "Make core-generated-annotation-stubs link as core stubs." am: dd6dd18ef6
am: 075ed06c48

Change-Id: Ibfa8b26e17a5f2c3f267b7a0f8748e1496d5be79
2019-05-13 05:07:53 -07:00
Pete Gillin dd6dd18ef6 Merge "Make core-generated-annotation-stubs link as core stubs." 2019-05-13 11:37:43 +00:00
Colin Cross 6dbdae49c2 Merge "Write dexpreopt.config again during the build" am: 0967b34dd9
am: 927aad4f0a

Change-Id: I2123191811df02da3b2f1e123eff79b04b40315b
2019-05-10 21:27:16 -07:00
Colin Cross 0967b34dd9 Merge "Write dexpreopt.config again during the build" 2019-05-11 04:11:58 +00:00
Colin Cross 2d00f0dcae Write dexpreopt.config again during the build
Writing $OUT/dexpreopt.config during build setup and then using
it during the build causes bad incremental builds if a cleanspec
removes $OUT/dexpreopt.config.  Create a rule in Soong to write
out a copy so that it is a normal build artifact.

Bug: 132379813
Test: m checkbuild
Change-Id: I7755a7f8c1d6561fc83022a7f4cf7e4a64e989c9
2019-05-10 07:07:21 -07:00
Pete Gillin 2c18ebd83c Merge "Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." am: 42e862c56d
am: 350f0987bf

Change-Id: Ibfc75aa4c4356d86cf7ce80becff0cf92cf98e14
2019-05-10 05:22:48 -07:00
Pete Gillin cbff326fe6 Make core-generated-annotation-stubs link as core stubs.
Bug: 123891440
Test: EXPERIMENTAL_USE_OPENJDK9=true make droid

(cherry picked from commit 4528becc46)

Merged-In: I117828f13a604030d1c36bdb60fffec4c4e08d6e
Change-Id: I17fa4e0c4106b63bf3cb0e3c3f78498a4072d9f5
2019-05-10 13:05:23 +01:00
Pete Gillin 42e862c56d Merge "Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." 2019-05-10 11:50:08 +00:00
Jaewoong Jung ea1bdb002d Uncompress dex file in imported apk when needed.
This implements the uncompress-dexs macro's behavior in Soong.

Test: Converted TvSampleLeanbackLauncher + zipinfo
Change-Id: I9477aa21429d055f3f36ca90c7fd2c345c999029
2019-05-09 14:38:11 -07:00
Colin Cross 48b8a7379d Merge "Fix dangling rules on aosp_cf_x86_phone" am: 11cd91dada
am: 48fcec3d03

Change-Id: I5f80ed7dcae514b7d8c4c0e31a2d023bb9d335fc
2019-05-09 09:31:46 -07:00
Treehugger Robot 11cd91dada Merge "Fix dangling rules on aosp_cf_x86_phone" 2019-05-09 16:16:01 +00:00
Pete Gillin 0c2143e1ee Rename EXPERIMENTAL_USE_OPENJDK9 to EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9.
The current EXPERIMENTAL_USE_OPENJDK9 environment variable is a legacy
from when the 8 -> 9 toolchain upgrade was happening. That migration
is done and the variable only affects the language level, so it should
have a name that reflects that. (The current situation would be
especially confusing if we started a 9 -> 11 toolchain upgrade,
presumably controlled by a variable like EXPERIMENTAL_USE_OPENJDK11,
since the two settings look incompatible but are actually orthogonal.)

The current variable historically allowed a value or "1.8" which meant
"use the OpenJDK 9 toolchain but target language level 8". That value
no longer has any meaning and the new variable doesn't allow it.

Bug: 131678633
Test: `make` with `EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9=true`
Test: `javap -v $OUT_DIR/soong/.intermediates/libcore/core-oj/android_common/javac/classes/java/util/List.class | grep 'major version'` shows 53
Test: Audit all mentions of the old string here and downstream
Change-Id: Idad808c7f07913baba1a777627322d5452dabcef
2019-05-09 15:36:29 +01:00
Jaewoong Jung 726fd0dc35 Merge "Implement DPI variants in android_app_import." am: 53ad63c127
am: a64eb7eada

Change-Id: Idcfca3ed5cbeb4955958d007ef701939cd3f26ae
2019-05-08 17:54:56 -07:00
Jaewoong Jung 53ad63c127 Merge "Implement DPI variants in android_app_import." 2019-05-08 23:34:04 +00:00
Colin Cross c11e0c5a39 Fix dangling rules on aosp_cf_x86_phone
aosp_cf_x86_phone uses SecondArchIsTranslated, which was leaving
a dangling rule from the oatdump rules to
out/soong/vsoc_x86/dex_bootjars/system/framework/arm/boot.art.
Consolidate the code to select targets for dexpreopting and use it
in more places to prevent references to boot images that were not
generated.

Test: m checkbuild
Change-Id: Ia4945a99ff5e575e759299106559c85f38489acc
2019-05-08 22:26:14 +00:00
Colin Cross 6c6e6cd64d Don't hide *.kotlin_module in turbine dependencies
The jars containing the merged header classes from transitive
static dependencies were stripping all of META-INF/.  Kotlin
puts metadata in META-INF that is used to map the package to
the static class that contains the package-level functions.

This also exposed that the metadata in META-INF is always
called "name.kotlin_module", so a library that contains
kotlin files with a dependency that also contains kotlin files
would shade the metadata file.  Use a unique name instead.

Fixes: 131709692
Test: m checkbuild
Change-Id: I5cd276e563206e37c4c0d90fe9f346e9396f88c0
2019-05-08 14:30:12 -07:00
Jaewoong Jung a5e5abc449 Implement DPI variants in android_app_import.
Bug: 128610294
Test: app_test.go
Change-Id: Ie3e558bfdb40de6b0b9df95d3b373d08a4084d7b
2019-05-07 17:55:23 -07:00
Colin Cross 3ec27ec6cf Support android_robolectric_test with merged binary resources
android_robolectric_test with merged binary resources
requires a gnerated test_config.properties file pointing
to the APK containing binary resources.

Test: m RunSettingsLibRoboTests
Change-Id: Ic84714c09ea1bae70537556c8385405fe392f79f
2019-05-07 11:15:46 -07:00
Colin Cross 2146d5642d Merge "Track sources for srcjars across modules" am: 082640d6ee
am: 222f5ee5f2

Change-Id: I1787ef4d66ebd129a15536b1455139235613ce2c
2019-05-07 10:43:23 -07:00
Treehugger Robot 082640d6ee Merge "Track sources for srcjars across modules" 2019-05-07 17:25:52 +00:00
Colin Cross 1cd8159cd3 Merge "Allow module types to generate resources" am: da2bba1d71
am: 04c69f1c9d

Change-Id: I4b3b77e49bd2e9d7fe22a97d52131da0a9a4e598
2019-05-07 09:45:00 -07:00
Treehugger Robot da2bba1d71 Merge "Allow module types to generate resources" 2019-05-07 14:19:52 +00:00
Jaewoong Jung 514fd602b9 Merge "uncompressedDex option for android_app_import." am: ddda3ce23a
am: 6538ed7e72

Change-Id: I30230e28afd58c132049efa50b0aaee2ab6a57be
2019-05-06 14:42:25 -07:00
Jaewoong Jung ddda3ce23a Merge "uncompressedDex option for android_app_import." 2019-05-06 21:24:53 +00:00
Colin Cross 0c4ce21615 Track sources for srcjars across modules
Robolectric coverage needs a srcjar that sometimes needs to
include sources of dependencies.  Track the arguments and
dependencies necessary to jar the sources.

Test: TestIncludeSrcs
Change-Id: I9979d2b8350923a2237e743c232e6e548f54ba3b
2019-05-06 14:22:26 -07:00
Colin Cross 988708ce75 Allow module types to generate resources
Robolectric will need to generate extra resources to be added to
the jar.

Test: TestResources
Change-Id: I028f91ea8fc5d1e59e4e805876d70f57d8899f11
2019-05-06 14:22:26 -07:00
dimitry 46becd866e Merge "Add native_bridge target to Android.bp" am: ec89e4c65c
am: 9da19e15ee

Change-Id: I49ecaa7fdb8bd283c9a8df00ddb6572bab9d140d
2019-05-03 16:47:46 -07:00
Jaewoong Jung acf18d7c63 uncompressedDex option for android_app_import.
This also partially consolidates shouldUncompressDex implementations.

Bug: 128610294
Test: TreeHugger
Change-Id: I7cea5a3890ddd473f63c0738a35af067455b5c4d
2019-05-03 15:58:41 -07:00
dimitry 1f33e40972 Add native_bridge target to Android.bp
This allows us to build guest libraries for the native bridge for
arm/arm64 architectures.

Bug: http://b/77159578
Test: make
Change-Id: I35520ca456105ddadd456c78a4eb1e6de39147c5
2019-05-03 15:33:28 +02:00
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
Paul Duffin 42df144fd4 Add java_test_helper_library
Extracts testSuiteComponent() function to reduce duplication.

Bug: 128969758
Test: atest CtsJdwpTestCases
Change-Id: I23746b18112d22f8670666f429a665b34b1955fd
2019-03-25 11:48:01 +00:00
Colin Cross 235810e510 Merge "Don't visit disabled modules with SOONG_COLLECT_JAVA_DEPS=true" am: 6d75c9d18e am: 4e976b56be
am: d139b8037c

Change-Id: I2007374b40673f07085a94d110cf65cfeda9570e
2019-03-23 08:01:59 -07:00
Treehugger Robot 6d75c9d18e Merge "Don't visit disabled modules with SOONG_COLLECT_JAVA_DEPS=true" 2019-03-23 14:41:37 +00:00
Colin Cross 593bb1c16c Merge "Rename jetifier property and add it to androidmk" am: 4ada982da9 am: 33938d3188
am: eb1cebad0d

Change-Id: I6ae03146be0e84ac0391c5db2a944eb054b8a9e9
2019-03-22 23:32:57 -07:00
Treehugger Robot 4ada982da9 Merge "Rename jetifier property and add it to androidmk" 2019-03-23 06:09:25 +00:00
Colin Cross c48428a6bb Don't visit disabled modules with SOONG_COLLECT_JAVA_DEPS=true
Calling AndroidMk() on a disabled module may not be safe because
the module will not have had GenerateAndroidBuildActions() called
on it to initialize the data structures that AndroidMk() expects
to exist.  Check module.Enabled() before generating IDE info.

Fixes: 129089976
Test: SOONG_COLLECT_JAVA_DEPS=true m nothing
Change-Id: Icd79088c532c1842801f2bf89d92bc1a67109936
2019-03-23 04:42:57 +00:00
Jaewoong Jung fb96a51b76 Merge "Add synopsis for prebuilt_apis." am: 66f2e8701e am: a04359740d
am: 8dce4b328d

Change-Id: Ic4a3491e288d9d2316d49cbb1bf6c88ee4934988
2019-03-22 10:41:15 -07:00
Jaewoong Jung 66f2e8701e Merge "Add synopsis for prebuilt_apis." 2019-03-22 17:16:45 +00:00
Colin Cross 1001a7971a Rename jetifier property and add it to androidmk
Rename jetifier_enabled to jetifier since there are no users
yet and it is more consistent with the rest of the Soong
properties.  Also add it to androidmk translation.

Fixes: 123524520
Test: androidmk_test.go
Change-Id: Ib4c688cf3cb171a822ddf7dd49467522c4c1276c
2019-03-22 15:25:30 +00:00
Jaewoong Jung 79e3e79ee8 Merge "Add override_android_app module type." am: e9665723da am: 9874d6abe6
am: c3432e294e

Change-Id: I28638a23c6140ae1775187a2afc61b15db97f487
2019-03-22 07:57:11 -07:00
Jaewoong Jung e9665723da Merge "Add override_android_app module type." 2019-03-22 14:36:04 +00:00
Inseob Kim 2d99aace46 Merge "Fix checking of empty slice properties" am: 6b200500cc am: 2aad89a882
am: adabb74d08

Change-Id: I2529e13a5310163b22ce41c12e5ab2242c944b4a
2019-03-21 19:00:18 -07:00
Treehugger Robot 6b200500cc Merge "Fix checking of empty slice properties" 2019-03-22 01:22:11 +00:00
Jaewoong Jung 5fb5b2a7f5 Add synopsis for prebuilt_apis.
Test: m soong_docs
Change-Id: I0e2cefd3dd24e5c8483d32cc325a37e96d3d495c
2019-03-21 17:44:11 -07:00
Jaewoong Jung 525443aa22 Add override_android_app module type.
This is a new implementation of overriding module types that makes use
of local variants. With this, product owners can use PRODUCT_PACKAGES to
decide which override module to include in their products.

Bug: 122957760
Bug: 123640028
Test: app_test.go
Change-Id: Ie65e97f615d006b6e9475193b6017ea9d97e8e97
2019-03-21 13:26:20 -07:00
Inseob Kim 6e93ac9a32 Fix checking of empty slice properties
Properties can be empty (not nil), and in that case some weird error
messages will happen to be emitted.

Bug: N/A
Test: try to build with api_pacakges: [] and srcs: []
Change-Id: I492077616e742072696265796520737465616b21
2019-03-21 22:04:01 +09:00
Anton Hansson b56333c19b Separate device and product overlays am: 53c88448fd am: d24adcf68e
am: 40286c75e4

Change-Id: I1e6ae2fe7f5cc57271edce235b702b83b64a7902
2019-03-21 04:46:05 -07:00
Anton Hansson 53c88448fd Separate device and product overlays
This change adds book-keeping of whether an overlay came from
DEVICE_PACKAGE_OVERLAYS or PRODUCT_PACKAGE_OVERLAYS. This is
later used when writing the output to soong_app_prebuilt.mk, to
use either LOCAL_SOONG_[DEVICE|PRODUCT]_RRO_PACKAGES depending
on the original source.

This change is intended to be a noop on its own, but allows a
follow-up make change to customize the location of the auto-generated
RRO packages.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: Ib24fe1d05be132c360dd6966f7c83968c9939f77
2019-03-21 11:25:46 +00:00
Colin Cross 75bace9c07 Replace ctx.ExpandSources with android.PathsForModuleSrc am: 8a49795df1 am: 9bcee1f400
am: 3cafca1d18

Change-Id: I8945a8a775d5931489ef3f3614046207dd816f1e
2019-03-20 12:53:01 -07:00
Colin Cross ecfa227f40 Remove ModuleSrcPath am: 07e51619a2 am: 734ad216fe
am: 055d480456

Change-Id: I386ab7a179da59477acc38571f63e652ac47d8a2
2019-03-20 12:52:44 -07:00
Colin Cross 5654c3f42f Add dex_import module type am: 42be761ebd am: 66f3f2a01a
am: 5d56651745

Change-Id: I6a96468ef78f5cd0c1fab335e691bcc19a8988dd
2019-03-20 12:51:37 -07:00
Colin Cross 8a49795df1 Replace ctx.ExpandSources with android.PathsForModuleSrc
Move the logic from ctx.ExpandSources into android.PathsForModuleSrc
and ctx.ExpandSource into android.PathForModuleSrc, and deprecate
them.  When combined with the pathDepsMutator this will let all
properties that take source paths also take filegroups or genrule
outputs, as long as they are tagged with `android:"path"`.

Test: All soong tests
Change-Id: I01625e76b5da19240e9649bf26a014eeeafcab8f
2019-03-20 19:36:13 +00:00
Colin Cross 07e51619a2 Remove ModuleSrcPath
ModuleSrcPath was designed as a type that ensured that modules only
referenced sources inside the directory that contained the Android.bp
file.  In practice they don't work very well, because allowing
filegroups and genrules as inputs to any module that takes a source
path means that the path might end up being to a file in another
source directory or to a generated file in the output directory.

Remove ModuleSrcPath, replacing it with SourcePath in the places
that need to explicitly refer to a path in the source tree, or
Path where it may be a source path or a generated path.

Make PathForModuleSrc return a Path instead of a SourcePath in
preparation for consolidation with ctx.ExpandSources, which will
make it possibly return paths to generated files.

Test: All soong tests
Change-Id: I973a78470ed14307eea5f6d0cc93942775a65715
2019-03-20 19:36:03 +00:00
Colin Cross 42be761ebd Add dex_import module type
Add a module type for importing a prebuilt jar that contains
classes.dex files.

Test: m with a prebuilt jar that contains classes.dex files in
      PRODUCT_BOOT_JARS
Test: java_test.go, dexpreopt_test.go, dexpreopt_bootjars_test.go
Bug: 124804356
Bug: 125517186

Change-Id: I496848f9dca11f758d49b1cb68168cec7f8e1718
2019-03-20 19:29:59 +00:00
Colin Cross 11cdb3202b Merge "Support package_splits" am: d62bfe5604 am: c20ea4c09f
am: 58350d8d33

Change-Id: I727b1cb34b5a808f48b399d6ad938f7a993f3229
2019-03-20 10:49:05 -07:00
Adam Vartanian 1aad9078a2 Merge "Add Conscrypt to coverage" am: 36c70bcfcb am: cecf06a088
am: 637c287938

Change-Id: I082f23363577177ac00ee8f706eee0a9d960c986
2019-03-20 10:48:37 -07:00
Inseob Kim 7fd0627923 Merge "Refine error messages in case of missing api files" am: 03a471a853 am: 1c033c09d8
am: 165bafc1ce

Change-Id: I55cbbefe510083e31a0bca3cf61781be1b4231de
2019-03-20 10:48:09 -07:00
Treehugger Robot d62bfe5604 Merge "Support package_splits" 2019-03-20 15:45:13 +00:00
Treehugger Robot 36c70bcfcb Merge "Add Conscrypt to coverage" 2019-03-20 14:52:06 +00:00
Inseob Kim 8098faad9f Refine error messages in case of missing api files
Some non-interpretable error messages has been shown in case of missing
current api files. Instead of that messy errors, This clearly tells
users what is the problem and how to fix it.

Bug: 126259114
Test: 1) try to build a sysprop_library and a java_sdk_library without
creating txt files under api/, and see it fails.
Test: 2) Copy and paste the emitted command, and try to build again.

Change-Id: I986781cc710475647c2b996b0f1c51a6f50c0ba2
2019-03-20 15:33:06 +09:00
Colin Cross e560c4aabc Support package_splits
Pass the package_splits list from the property to aapt2 as
--split arguments, sign the extra outputs, install them, and
add them as extra output files for SourceFileProducer.

Bug: 127921149
Test: TestAppSplits
Change-Id: Id94a53ae6a8a68ec81e98abba2fefc9c23feaa7a
2019-03-19 23:33:47 +00:00
Adam Vartanian fa62cfc2aa Add Conscrypt to coverage
Bug: 73156932
Test: manual coverage run
Change-Id: I20dc1595ba55d8425bf16770c1f2e6e4fa8bffae
2019-03-13 13:46:14 +00:00
Andrei-Valentin Onea e94dea3149 Merge "Differentiate system and test apis in whitelist" am: fdd1457fa6 am: 2af4ac8fa8
am: 4f0ca94115

Change-Id: Ifc224a414f5502fd437d49cfc0be8a42cfd33f26
2019-03-09 04:07:53 -08:00
Andrei-Valentin Onea fdd1457fa6 Merge "Differentiate system and test apis in whitelist" 2019-03-08 16:22:11 +00:00
Colin Cross 700de16c35 Annotate paths and deprecate ExtractSource(s)Deps am: 27b922f53e am: e5f6f175a8
am: 8a098ecc62

Change-Id: I7d879187c748038ad64c3526148eaff7b7ba1a53
2019-03-07 12:06:59 -08:00
Colin Cross 27b922f53e Annotate paths and deprecate ExtractSource(s)Deps
Add `android:"path"` to all properties that take paths to source
files, and remove the calls to ExtractSource(s)Deps, the
pathsDepsMutator will add the necessary SourceDepTag dependency.

Test: All soong tests
Change-Id: I488ba1a5d680aaa50b04fc38acf693e23c6d4d6d
2019-03-07 18:36:35 +00:00
Colin Cross ccfe15d92a Merge "Add modules for converting java modules between host and device" am: e3ad4144db am: d5f25c7685
am: 3ce8fedd9a

Change-Id: I09f01ae076b93cdec5b738eed00c2d7a40e5555d
2019-03-05 20:06:45 -08:00
Colin Cross 3d7c9827d5 Add modules for converting java modules between host and device
java_device_for_host and java_host_for_device allow treating a
device module as a host module and vice versa.  They will be useful
for converting layoutlib and robolectric to Soong, as these modules
run device java code on the host.

Bug: 117920228
Test: device_host_converter_test.go
Change-Id: Ia9a371fb41a97bc16338097f3ce8b40099744167
2019-03-05 23:09:45 +00:00
Colin Cross 1885ec2b79 Add dexpreopt_bootjars_test.go am: 762286723a am: 2c81ab734f
am: 15836b9ceb

Change-Id: I4d047c47d783f6e788eeccdf83dab646338d15d8
2019-03-04 19:40:21 -08:00
Colin Cross 33db6a29cc Move some java test setup later am: c28bb0b8f9 am: 7e2b9c48ca
am: 7cb6f9e601

Change-Id: Ib0924d35bc9cd844a071e5f8729f5e2f7b8b6745
2019-03-04 19:40:03 -08:00
Colin Cross 762286723a Add dexpreopt_bootjars_test.go
Add a test that exercises the dexpreopt_bootjars.go singleton.

Test: dexpreopt_bootjars_test.go
Change-Id: I01d4f6e22f6ff7b809af043391d7b6209dcb8675
2019-03-05 03:17:51 +00:00
Colin Cross c28bb0b8f9 Move some java test setup later
Move ctx.Register() from testContext() to run() so that tests can
register more singletons before the env singleton is registered.
Any singletons registered after the env singleton will hit an error
if they attempt to read an environment variable.

Move setDexpreoptTestGlobalConfig from TestConfig to run() so that
a test can set their own custom config after TestConfig but before
run().

Test: All Soong tests
Change-Id: Iec47f4b7898736f583cbd6bd53e4d02a035f4fb2
2019-03-05 03:17:42 +00:00
Colin Cross 513b76d51f Update manifest merger to use binary am: 87ecbfe107 am: d8f3e6f5d4
am: 867b1daec4

Change-Id: I72f9f76865d19495cb340adcf5244e8c7f2f8a38
2019-03-04 14:24:58 -08:00
Colin Cross 87ecbfe107 Update manifest merger to use binary
Manifest merger is now a java_binary instead of a collection of jars,
it can use the single binary as the dependency.

Bug: 112607039
Test: m checkbuild
Change-Id: Iea6c97c99a3bb09952fed2b25437b644f4e863f8
2019-03-04 22:02:01 +00:00
Colin Cross 9a4a2f313a Replace *Escape with *EscapeList am: 0b9f31fb08 am: 5b6741d94d
am: 29560640a9

Change-Id: I04930d0949d8fb3317317aad7f577b75e47a9505
2019-03-04 10:30:20 -08:00
Colin Cross 0b9f31fb08 Replace *Escape with *EscapeList
Follow the change to blueprint to make *Escape take and return a string
and add *EscapeList that take and return slices of strings.  Fix up
a few places that were unnecessarily converting a string to a slice
and back to a string.

Test: m nothing
Change-Id: I3fa87de175522205f36544ef76aa2f04aef1b936
2019-03-04 18:11:53 +00:00
Inseob Kim ba8012f1b7 Merge "Ignore missing prebuilt_apis of java_sdk_library" am: 4be65809d7 am: 8740b4c27a
am: 28281cef98

Change-Id: I248d72e776b5bee568c1213b2ebd7130ce0793e6
2019-03-03 23:32:26 -08:00
Treehugger Robot 4be65809d7 Merge "Ignore missing prebuilt_apis of java_sdk_library" 2019-03-04 07:20:55 +00:00
Colin Cross fac1c80666 Don't add static libs resources to implemenation jars am: 247e0cfaa4 am: 9cbdd49dc8
am: 8c25acf1fd

Change-Id: I084f186143006b7f8d5e6ba519fd890354703174
2019-03-03 21:53:10 -08:00
Inseob Kim 38449af64f Ignore missing prebuilt_apis of java_sdk_library
Building java_sdk_library without defining prebuilt_apis has been
failing with weird error messages. So one have to touch empty txt files
and create prebuilt_apis module, even when the java_sdk_library is
brand-new and has no previous versions. This commit fixes it so that API
check against previous version is skipped, in the case of missing
prebuilt_apis.

Note that Current api txt files (placed under api/ directory) are still
needed (make update-api)

Bug: 126259114
Test: tries to build without touching empty api txt files.
Change-Id: I93630f4139cbf502621693ec315dc06c0d07d1c3
2019-03-04 10:56:53 +09:00
Colin Cross 247e0cfaa4 Don't add static libs resources to implemenation jars
Static dependency resources will already be in the resources jar
and the implementation and resource jar, they shouldn't be in
the implementation jar.

Test: m checkbuild
Change-Id: I4d4dab1d2e55e92ba9a95a66b246c721b9bf6410
2019-03-03 11:34:47 -08:00
Andrei Onea e04da07dfe Differentiate system and test apis in whitelist
@SystemApi and @TestApi entries in the whitelist can now be
differentiated from the rest of the public apis.

Test: m
Change-Id: Ie6a0108540cffe11992739d6391531401378f14b
2019-03-01 17:44:13 +00:00
Colin Cross 148a568ad9 Optimize CPU time when running d8 and r8 am: 6db4d4e613 am: f334ea833f
am: e6c2c1313c

Change-Id: I3a6b7ec5ca04250ec7e0e333ef64d9cfe6133553
2019-03-01 07:51:29 -08:00
Colin Cross ba358c6c90 Merge "Move boot image oatdump phony rules into Soong" am: 292d6cfd73 am: 7cd2df4887
am: e3c13d6778

Change-Id: Ieb6f4e4b1af4340051012ad8fa2f7bbac34261f3
2019-03-01 07:47:34 -08:00
Colin Cross 6db4d4e613 Optimize CPU time when running d8 and r8
Pass -XX:+TieredCompilation -XX:TieredStopAtLevel=1 to the JVM to
reduce the time spent JITing, which in local experiments reduced
the CPU time of R8 while increasing the wall time, and reduced the
total number of runnable threads.

Without the new flags:
$ time out/soong/host/linux-x86/bin/r8-compat-proguard -injars out/target/common/obj/APPS/Dialer_intermediates/classes.jar ...
real	0m30.090s
user	4m35.337s
sys	0m12.853s

With the new flags:
$ time out/soong/host/linux-x86/bin/r8-compat-proguard -JXX:+TieredCompilation -JXX:TieredStopAtLevel=1 -injars out/target/common/obj/APPS/Dialer_intermediates/classes.jar ...
real	0m35.674s
user	2m45.135s
sys	0m9.531s

The increase in wall time should be offset by the better parallelism from
the reduced CPU time.

Bug: 119270658
Test: m checkbuild
Change-Id: I8fc78b5ef1f8c6f51fd97a29461b96ae2b35cada
2019-03-01 15:28:19 +00:00
Colin Cross 292d6cfd73 Merge "Move boot image oatdump phony rules into Soong" 2019-03-01 15:27:35 +00:00
Paul Duffin 4ea7fb7c07 Merge changes Ib0389900,Ib2d69dea am: e28d0c0ff3 am: 7204ec83ef
am: 1a5d25499a

Change-Id: I5b2ce79790b12fab360339faba6f7ef548eb961a
2019-03-01 01:23:21 -08:00
Paul Duffin e28d0c0ff3 Merge changes Ib0389900,Ib2d69dea
* changes:
  Fix hiddenapi issue when REMOVE_ATB_FROM_BCP=true
  Improve hiddenapi processing so it does not require white list
2019-03-01 09:04:39 +00:00
Colin Cross c9a4c36634 Move boot image oatdump phony rules into Soong
The boot image oatdump rules depend on the details of dexpreopting
the boot image.  Instead of exporting all of the necessary values
to make, move the rules into Soong instead.  Also removes the
ART_DUMP_OAT_PATH variable, and moves the output to
out/soong/boot.*.oatdump.txt.

Test: m dump-oat-boot
Change-Id: I055b1c39918ba3425c8393b3e1b5359df055472a
2019-02-28 22:00:21 -08:00
Jaewoong Jung 5b657bfba7 Merge "aapt2 flag for target manifest package override" am: ce3de3df0f am: a58c5c8139
am: b3f3924119

Change-Id: I86cbc75abb59f1e88ae20cc1d8e7004405246ef1
2019-02-28 19:37:21 -08:00
Jaewoong Jung ce3de3df0f Merge "aapt2 flag for target manifest package override" 2019-03-01 03:24:25 +00:00