Commit graph

1046 commits

Author SHA1 Message Date
Jaewoong Jung
ace17d35fd Merge "Add stl property to android_app." 2019-05-23 20:55:42 +00:00
Colin Cross
6be6c2e4c5 Merge "Add kotlin-stdlib-jdk8 when using Kotlin" 2019-05-21 18:11:59 +00: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
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
105920a792 Merge "Fix override_android_app dependency issues." 2019-05-16 15:07:13 +00: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
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
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
Treehugger Robot
f3e802bf0d Merge "Don't hide *.kotlin_module in turbine dependencies" 2019-05-13 20:21:47 +00:00
Jaewoong Jung
b7cb607812 Merge "Uncompress dex file in imported apk when needed." 2019-05-13 17:54:00 +00:00
Pete Gillin
dd6dd18ef6 Merge "Make core-generated-annotation-stubs link as core stubs." 2019-05-13 11:37:43 +00: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
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
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
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
Treehugger Robot
082640d6ee Merge "Track sources for srcjars across modules" 2019-05-07 17:25:52 +00:00
Treehugger Robot
da2bba1d71 Merge "Allow module types to generate resources" 2019-05-07 14:19:52 +00: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
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
Treehugger Robot
0e7dbebe7e Merge "Fix use_embedded_native_libs handling for android_test" 2019-05-02 22:10:29 +00:00
Colin Cross
5346d07108 Merge "Support robolectric_test" 2019-05-02 16:37:33 +00:00
Jaewoong Jung
e7d52c779f Merge "Add android_app_import." 2019-05-02 14:00:22 +00: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
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
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
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
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