Commit Graph

907 Commits

Author SHA1 Message Date
Paul Duffin
6e48ec715c Merge "Support libraries (not just boot jars) that have hiddenapi" am: f854d3e4be am: 31d68763ad
am: 919d0e7e5a

Change-Id: I9b17d19f5ae8d65a572463555c8cbae6b1c2d32c
2019-02-18 04:34:39 -08:00
Paul Duffin
f854d3e4be Merge "Support libraries (not just boot jars) that have hiddenapi" 2019-02-18 12:19:42 +00:00
Sundong Ahn
37c72d3c95 Merge "Get latest api version" am: 39b31fa071 am: 1b3a31eab2
am: 4516730eda

Change-Id: I355867fee15297ba27144a8f5e31a1c4b0cd95c5
2019-02-17 17:37:01 -08:00
Treehugger Robot
39b31fa071 Merge "Get latest api version" 2019-02-18 01:12:47 +00:00
Colin Cross
b19745363f Add java/testing.go for sysprop_test.go
Share more of the setup code for java tests to sysprop_tests.go.

Test: java_test.go, sysprop_test.go
Change-Id: I0e3b287bf188c432d995a9a91a18ebef12aa47d1
2019-02-15 23:22:38 -08:00
Colin Cross
1092376683 Merge "Fix resource overlay order for static libraries" am: 0653d6d464 am: 2a1f4b2bda
am: c6cf7f0f9f

Change-Id: Ia2ee7b77a90b2213767643e3f4c5dbaa8d5e5139
2019-02-15 11:34:26 -08:00
Colin Cross
0653d6d464 Merge "Fix resource overlay order for static libraries" 2019-02-15 18:54:49 +00:00
Paul Duffin
e5b5657f87 Support libraries (not just boot jars) that have hiddenapi
The build assumes (apart from one minor exception) that only modules
that are in the PRODUCT_BOOT_JARS list require processing as part of
the hiddenapi. Unfortunately, that is not true for android.test.base,
at least not when REMOVE_ATB_FROM_BCP=true.

This change adds a white list (containing android.test.base) of
additional modules that should be processed as part of the hiddenapi
and updates the hiddenapi.go file to use it.

It does not matter that android.test.base is a boot jar and in the
white list, the behavior is the same as it would be if it was only
in one.

Bug: 73711752
Test: make REMOVE_ATB_FROM_BCP=true droid and make droid
Change-Id: I1c64272f444e6866136c65fb7c48910d55811844
2019-02-15 14:35:30 +00:00
Paul Duffin
5043fd6c8a Remove reference to legacy-test and core-junit from comments am: 2fbbfb8630 am: 9ed226dad9
am: 153044c4c7

Change-Id: I77165fa5a5e12866f455d54d60ca0ddc811c470c
2019-02-14 03:19:36 -08:00
Paul Duffin
2fbbfb8630 Remove reference to legacy-test and core-junit from comments
The legacy-test and core-junit are no longer used by the runtime,
core-junit was removed a long time ago, legacy-test will be removed
soon.

Bug: 63127064
Test: TH
Change-Id: I094e7263afcba76b40361c3a681c9fd7a4314133
2019-02-14 10:53:59 +00:00
Sundong Ahn
8faab8a547 Get latest api version
The logic of getting latest api version has problem that we don't
guarantee $(module_name).latest is latest api txt file. So change this
logic to get the latest api txt file.

Test: make -j40
Change-Id: Ibbd8475061fc76169a4c94dcf148fece45b9a41d
2019-02-14 19:46:34 +09:00
Colin Cross
bec8530972 Fix resource overlay order for static libraries
If a static library has static library dependencies then all resources
need to be moved to an overlay to maintain the correct ordering so
that a static library resource overlays the same resource in a
dependency.

Also fix the ordering of transitive static dependencies, a direct
dependency should override a transitive dependency.

Expand TestEnforceRRO to include a transitive static library and
verify both the direct resources and overlays, and rename it to
TestAndroidResources.

Bug: 124108931
Test: TestAndroidResources
Change-Id: I355f835a2ffb728af28aa208d951794c609e7409
2019-02-14 03:35:21 +00:00
Inseob Kim
12865b096a Create sysprop_library soong module am: c0907f191a am: 92053b977e
am: 751a2cb98a

Change-Id: Ie9976968934c4231492af4ad4cbbcfe38790f040
2019-02-13 17:25:17 -08:00
Colin Cross
3019676b91 Merge "Add RuleBuilder.Installs().String()" am: 58b31ad33a am: a3c846bfb9
am: 2cb5b7b1e3

Change-Id: Ib9caffa1dde44dad422c9e82d93052b70d22bf27
2019-02-13 16:58:10 -08:00
Inseob Kim
c0907f191a Create sysprop_library soong module
A newly introduced sysprop_library soong module will generate a
java_sdk_library and a cc_library from .sysprop description files.
Both Java modules and C++ modules can link against sysprop_library
module, thus giving consistency for using generated sysprop API.

As Java controls accessibility of Internal / System properties with
@hide and @SystemApi, 2 different header files will be created. And
build system will selectively expose depending on the property owner
and the place where the client libraries go into.

Bug: 80125326
Bug: 122170616
Test: 1) Create sysprop_library module.
Test: 2) Create empty txt files under prebuilts/sdk.
Test: 3) Create api directory, make update-api, and see changes.
Test: 4) Try to link against sysprop_library with various clients.
Test: 5) Soc_specific, Device_specific, Product_specific, recovery flags
work as intended.
Change-Id: I78dc5780ccfbb4b69e5c61dec26b94e92d43c333
2019-02-13 23:32:51 +00:00
Colin Cross
58b31ad33a Merge "Add RuleBuilder.Installs().String()" 2019-02-13 23:11:38 +00:00
Colin Cross
bf443294be Add module type docs to the java package am: 1b16b0e031 am: f7bbb64eef
am: d7776d8a92

Change-Id: Ied0c7a3d34da18a3d19a316558b0703e2a71b8c0
2019-02-13 11:22:49 -08:00
Colin Cross
1b16b0e031 Add module type docs to the java package
Add some overview of the java module types so that we have something
to display in the autogenerated docs.

Bug: 67909957
Test: m soong_docs
Change-Id: I3594dd550f8272f4418f3ea12cded4083674809b
2019-02-13 18:39:40 +00:00
Colin Cross
deabb94380 Add RuleBuilder.Installs().String()
Add a RuleBuilderInstalls type for a slice of RuleBuilderInstalls,
and give it a String() method that returns the list of installs
in the format that is convenient for passing to Make.

Test: rule_builder_test.go
Change-Id: I2e9cd9abf4dfb0ad312d0a6662f1567baf9cd222
2019-02-13 08:03:29 -08:00
Nicolas Geoffray
108c3ebbfb Merge "Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""" am: 59d15c192d am: 9f04bacac6
am: b982b311d5

Change-Id: I90e21d611d503ad8a0a0ca0c4a0f22736ff78359
2019-02-13 04:18:48 -08:00
Nicolas Geoffray
59d15c192d Merge "Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""" 2019-02-13 11:59:39 +00:00
Nicolas Geoffray
fa6e9ec003 Revert "Revert "Never strip and store dex files uncompressed when they are preopted on system.""
This reverts commit 67e8ec1973.

Test: build && atest android.text.cts.EmojiTest#testEmojiGlyphWebView on Cuttlefish
Exempt-From-Owner-Approval: Got +2 from Colin, latest PS is a rebase across conflicts.

Change-Id: I99faf0f2ec698d70c107516bd43756b9ddcb90d0
2019-02-13 11:59:20 +00:00
Paul Duffin
4c6e1cee25 Support $(location...) in droiddoc_options am: 1151247c29 am: 55eb2f9e03
am: 6f27c219bf

Change-Id: I48a097a67d68433b4052d144e1dca0c5a50275b8
2019-02-13 02:54:33 -08:00
Paul Duffin
10879f7b0d Fix droiddoc handling of $(location ...) am: 99e4a50202 am: a0957054ac
am: 5b3e6c99a7

Change-Id: Ie1440a28a05d237942b6a39133b8e80697d2e891
2019-02-13 02:42:57 -08:00
Paul Duffin
1151247c29 Support $(location...) in droiddoc_options
Adds droiddoc_option_files property which are passed through to
droiddoc's arg_files property.

Bug: 124220029
Test: make checkbuild
Change-Id: I6e98752cebeaac5a8779e04e6c804763c177e354
2019-02-13 10:11:54 +00:00
Paul Duffin
99e4a50202 Fix droiddoc handling of $(location ...)
Bug: 124218911
Test: make checkbuild
Change-Id: I4d9c52b40ce4e8b9ae07f557e079e4f101fbbe87
2019-02-13 10:11:54 +00:00
Colin Cross
dcf0939f01 Use ArchType in dexpreopt config am: 74ba962d29 am: 97e623455c
am: e7e62af172

Change-Id: Ia2adcde5bfda51856dbc9c7bd6e0d374f3021631
2019-02-12 17:32:11 -08:00
Colin Cross
6cb5df817b Merge "Make java_sdk_library implement Dependency" am: 1cd8a57510 am: 78f9df046e
am: 9de4ae9c73

Change-Id: Iee1c80101337d1f0e770b026faa07e0cff7b604c
2019-02-12 17:30:29 -08:00
Colin Cross
2e1a228fc6 Merge "Move dexpreopt image selection out of dexpreopt package" am: a5ffe2426f am: c8e7005b65
am: ca41b529af

Change-Id: Iac1899325acbd2ae1c26e33bb5bb393cc86e4072
2019-02-12 17:25:20 -08:00
Colin Cross
74ba962d29 Use ArchType in dexpreopt config
Make ArchType implement the encoding.TextMarshaller and
encoding.TextUnmarshaller interfaces so that it can be used
as a value in the dexpreopt config structs that are passed
through JSON files.

Test: m checkbuild
Change-Id: Ie4c12443e7ee5fe43f42d5403bcde12d62f617e2
2019-02-12 17:05:47 -08:00
Colin Cross
1cd8a57510 Merge "Make java_sdk_library implement Dependency" 2019-02-13 01:01:03 +00:00
Colin Cross
a5ffe2426f Merge "Move dexpreopt image selection out of dexpreopt package" 2019-02-13 01:00:49 +00:00
Colin Cross
31080223d1 Merge "Add support for use_embedded_dex in Soong" am: 7805791106 am: cf3e29beef
am: e7557c90e4

Change-Id: Ie908d0ad56df4b48128540d3123cb9e399a9292d
2019-02-11 17:40:57 -08:00
Colin Cross
7805791106 Merge "Add support for use_embedded_dex in Soong" 2019-02-12 00:46:52 +00:00
Colin Cross
897d2ed92f Make java_sdk_library implement Dependency
dexpreopting boot jars is going to need to visit both java_library
and java_sdk_library modules.  Since java_sdk_library is already
a java_library module, move the SdkLibraryDependency methods out
of the way so that it will implement Dependency.  Also requries
re-ording some of the type switches to check for the more-specific
SdkLibraryDependency first.

Test: TestJavaSdkLibrary
Change-Id: I155c9ffaf31689dd150a4d99e07e432ff770b4a7
2019-02-11 15:29:51 -08:00
Colin Cross
c7e40aa578 Move dexpreopt image selection out of dexpreopt package
Instead of passing both the module and global dexpreopt image
selection into the dexpreopt package, determine the correct
dexpreopt image in the java package.

Also stop using the boot image "location" as an input, only
track the real path, and then convert it to the "location"
that dex2oat expects when constructing the command line.

Test: m checkbuild
Change-Id: I2be2b5917e09fd57428dab27849c0153fdc75722
2019-02-11 15:29:51 -08:00
Colin Cross
59aa17675b Merge "Revert "Never strip and store dex files uncompressed when they are preopted on system."" am: 8e41cdb267 am: 0ba1a099e0
am: ee257ce79e

Change-Id: If52af6ef1490fab2c37940c2caa284fd50524f19
2019-02-11 11:53:34 -08:00
Colin Cross
67e8ec1973 Revert "Never strip and store dex files uncompressed when they are preopted on system."
This reverts commit 4bb0106759.

Reason for revert: b/123436620

Change-Id: Ia7595ace4b76abaa99dbb651e7d2f088dec5bad9
2019-02-11 19:30:46 +00:00
Nicolas Geoffray
10652918f3 Never strip and store dex files uncompressed when they are preopted on system. am: 4bb0106759 am: 6adc67079e
am: 04fec6c35d

Change-Id: I48dd27a693986427f53bc179bb7e893d5d6b4e5b
2019-02-11 02:50:04 -08:00
Nicolas Geoffray
4bb0106759 Never strip and store dex files uncompressed when they are preopted on system.
In order for the runtime module to always be able to compile apps,
make sure we keep a copy of the dex files optimally.

Gated by a product flag if a product doesn't include the module yet.

Test: build
Change-Id: I4bfe00184fcfdf44b8d1866c5c550838b869c60a
2019-02-09 22:08:14 +00:00
Colin Cross
f535d249d8 Merge "Make manifest and APK agree on uncompressed native libs" am: 53d312637f am: d33cdc21bb
am: 7ea16f4cdf

Change-Id: I0a90e565c358ceb5eabb97e104176461dfef3171
2019-02-08 18:55:38 -08:00
Treehugger Robot
53d312637f Merge "Make manifest and APK agree on uncompressed native libs" 2019-02-09 02:25:32 +00:00
Jaewoong Jung
9e47b0e136 Merge "Add Android.mk lines for package name overriding." am: ea66057a50 am: 9b3e4cc3af
am: afe716dcdb

Change-Id: I5074c6721c4d4d39e4fc5611621ac56318742722
2019-02-08 13:27:31 -08:00
Jaewoong Jung
ea66057a50 Merge "Add Android.mk lines for package name overriding." 2019-02-08 21:00:27 +00:00
Colin Cross
46abdad46a Add support for use_embedded_dex in Soong
When use_embedded_dex is set, store the dex uncompressed in the
APK and set the android:useEmbeddedDex="true" attribute in the
manifest.

Test: m checkbuild
Change-Id: Iea6e7ed19599830ac72392ef93f9c98957df1cce
2019-02-08 15:25:17 +00:00
Colin Cross
e4246abd7f Make manifest and APK agree on uncompressed native libs
Only put uncompressed native libs in an APK if the min_sdk_version
supports it (>= 23, Marshmallow), and set
android:extractNativeLibs="false" in the AndroidManifest.xml so
that the platform won't extract them anyways.

Bug: 117618214
Test: m checkbuild
Change-Id: I760017e48bf3c6b618aabde0982df45995765d48
2019-02-08 15:24:47 +00:00
Anton Hansson
18b30f9a4c Workaround dupe resource directories am: 129b9ceeb1 am: 2fc1d0f1ea
am: c8fa538ac0

Change-Id: I80de41497623113dd12cf65c41a8148a294109dc
2019-02-08 00:14:06 -08:00
Anton Hansson
129b9ceeb1 Workaround dupe resource directories
A few apps are co-located with libraries they depend on statically,
and because it's not possible to specify "no resource_dirs", they
both end up depending on the same resources, leading to downstream
problems for RRO generation.

Workaround the problem by de-duping the RRO paths for a single app
for now.

Bug: 124035856
Bug: 123510624
Test: make with enforce_rro == *
Change-Id: I251f123eb4280ed72e1ccd2212cb5f3e746e645d
2019-02-08 07:55:00 +00:00
Colin Cross
95f416cac8 Merge "Remove unused dexpreopt UseEmbeddedDex" am: 6ff48cd048 am: 98b1442180
am: ad7571f464

Change-Id: I3d77352678e4ae698583b5f8426b055f5c4a03fc
2019-02-07 23:39:38 -08:00
Treehugger Robot
6ff48cd048 Merge "Remove unused dexpreopt UseEmbeddedDex" 2019-02-08 07:19:33 +00:00