Commit Graph

7352 Commits

Author SHA1 Message Date
Colin Cross
33dce942f2 Merge "Regenerate R.java files from LOCAL_STATIC_ANDROID_LIBRARIES" am: 93b4818201
am: c368d6196c

Change-Id: Iea1fb5b38ec54ed28b6f8b3c31aba3b43ec05b98
2018-05-02 15:03:20 -07:00
Colin Cross
c368d6196c Merge "Regenerate R.java files from LOCAL_STATIC_ANDROID_LIBRARIES"
am: 93b4818201

Change-Id: I1a010e7fb8ec913aa55ad0dee67ea7246fa281b0
2018-05-02 14:59:43 -07:00
Colin Cross
93b4818201 Merge "Regenerate R.java files from LOCAL_STATIC_ANDROID_LIBRARIES" 2018-05-02 21:51:10 +00:00
Dan Willemsen
919e49f155 Add --kati_stats to cleanspec processing am: 81759847b2
am: 6e74a87d08

Change-Id: I418ca812916748369d2b85dc9415d3e5c5ef4d57
2018-05-02 14:02:25 -07:00
android-build-prod (mdb)
a702eb290b Merge "Pass TARGET_DEVICE_DIR from dumpvars to later kati runs" am: d08726ac76
am: 90c6167f91

Change-Id: Ia784b534093968a4538325df8fa98e15a4850ced
2018-05-02 13:59:56 -07:00
Colin Cross
66f78820e1 Regenerate R.java files from LOCAL_STATIC_ANDROID_LIBRARIES
If a static android library lib1 has static_libs: ["lib2"] then the
R.class files for packages in lib2 will be merged into the jar for
lib1.  If an app has lib1 in its static_libs it will get the R.class
files from lib2 through lib1, instead of regenerating the R.java
files with numbering that matches the resource table of the app.

Pass transtive static android library dependencies on the aapt2
command line so that aapt2 will always regenerate the R.java
constants for those packages.

Also extract the packages that have R.java files after each aapt2
invocation.  This is not necessary for Soong, but is passed to
make to let it force regenerating the packages using
--extra-packages.

Bug: 78300023
Test: m checkbuild
Change-Id: I0f3444af44d2a9f370d1f156c908972f8cc3a1ee
2018-05-02 13:11:01 -07:00
Dan Willemsen
6e74a87d08 Add --kati_stats to cleanspec processing
am: 81759847b2

Change-Id: I8be41fdb51cc59473fd716381572ab91f61cde5b
2018-05-02 11:01:16 -07:00
android-build-prod (mdb)
90c6167f91 Merge "Pass TARGET_DEVICE_DIR from dumpvars to later kati runs"
am: d08726ac76

Change-Id: Idea2876c4389f1b8d51c6e0159284947e5d9ae08
2018-05-02 10:47:34 -07:00
Dan Willemsen
81759847b2 Add --kati_stats to cleanspec processing
So that we can see where the time is going. Also removes the obsolete
ASAN_OPTIONS, which moved to kati, but I forgot to update this instance.

Test: m nothing; check out/soong.log
Change-Id: I0c4066bad20fc2dc22b389f4c973d10dca554ee3
2018-05-02 17:44:36 +00:00
android-build-prod (mdb)
d08726ac76 Merge "Pass TARGET_DEVICE_DIR from dumpvars to later kati runs" 2018-05-02 17:35:34 +00:00
android-build-prod (mdb)
39c5198d73 Merge "Save list of AndroidProducts.mk files" am: 96bbc2ff22
am: 13a00b1608

Change-Id: I5b385dd3f32152d2681202d944945f5f3f0f802e
2018-05-02 01:40:42 -07:00
android-build-prod (mdb)
13a00b1608 Merge "Save list of AndroidProducts.mk files"
am: 96bbc2ff22

Change-Id: Ib72442842fc32da8deb80dd47de82f30be98f30f
2018-05-02 01:36:25 -07:00
android-build-prod (mdb)
96bbc2ff22 Merge "Save list of AndroidProducts.mk files" 2018-05-02 08:27:24 +00:00
Dan Willemsen
6ab79db2e6 Pass TARGET_DEVICE_DIR from dumpvars to later kati runs
The find commands used to locate the BoardConfig.mk can't be optimized
by Kati, so we're currently spending ~125ms three times during every
build (dumpvars, cleanspec, and the main kati run). Preserve the value
of TARGET_DEVICE_DIR from the dumpvars run so that we only need to run
the find commands once.

Bug: 78020936
Test: out/build-taimen.ninja is identical
Test: out/soong.log shows that we're not running these finds again
Change-Id: Iee56b454c3661de2b58c161169218ecaf2135398
2018-05-02 00:06:28 -07:00
Dan Willemsen
567851c9cc Save list of AndroidProducts.mk files
Bug: 78020936
Test: diff out/.module_paths/AndroidProducts.mk.list with existing find
      results
Change-Id: Ie09cc18b926b21d6d24a4cfc570686aed2893e00
2018-05-01 22:57:53 -07:00
Jiyong Park
90931dede0 Merge "Property api_srcs added for api-only source files" am: d126f7b52f
am: b5a2a3f5b5

Change-Id: I02fccd0e42ef5d1b58d65ae358513198dfc6c161
2018-05-01 20:13:51 -07:00
Jiyong Park
b5a2a3f5b5 Merge "Property api_srcs added for api-only source files"
am: d126f7b52f

Change-Id: Ibc94346520cace35d25ff5c73a95f8cb91ffaf88
2018-05-01 20:09:14 -07:00
Jiyong Park
d126f7b52f Merge "Property api_srcs added for api-only source files" 2018-05-02 03:04:40 +00:00
android-build-prod (mdb)
927340ecd3 Merge "CompilerDeviceProperties are added to the sdk impl library" am: b1a96e5ebf
am: 031973687f

Change-Id: I6e54c2f80c4cd3a2dffb6c87744e552e618a0393
2018-05-01 19:35:06 -07:00
android-build-prod (mdb)
031973687f Merge "CompilerDeviceProperties are added to the sdk impl library"
am: b1a96e5ebf

Change-Id: I500e28714da0c5cde9c1fa3c35c03834dd1fad93
2018-05-01 19:31:04 -07:00
android-build-prod (mdb)
b1a96e5ebf Merge "CompilerDeviceProperties are added to the sdk impl library" 2018-05-02 02:22:11 +00:00
Dan Willemsen
bb17d30941 Remove more problematic env vars am: ebfe33ad80
am: b81dc09c7c

Change-Id: Ie61d0f57026af854490d1148ef5d130d97603ec4
2018-05-01 12:02:58 -07:00
Dan Willemsen
b81dc09c7c Remove more problematic env vars
am: ebfe33ad80

Change-Id: I3cf98a08733c3c902049cac8b48dccc1564fb812
2018-05-01 11:58:26 -07:00
Jiyong Park
baaf9dd5ab Property api_srcs added for api-only source files
New property api_srcs is added to java_sdk_library. The property is used
to specify set of source files that will be part of the API but not part
of the runtime library. Currently, this is only for the legacy http
library (org.apache.http.legacy) where some framework classes (such as
android.net.SslError which are compiled into framework.jar) are
registered as its API for historical reason.

Bug: 77575606
Test: m -j
Change-Id: I36d153f4815f8e4c939d5eeec632a38e7943b4b0
2018-05-02 02:13:44 +09:00
Dan Willemsen
ebfe33ad80 Remove more problematic env vars
I got a report of a user exporting CDPATH in their shell and causing
strange issues in the build. We should never need this value (and it
probably shouldn't be exported from the shell either -- that was their
workaround).

NDK_ROOT causes issues with Android.mk files thinking that they're
building with the ndk (like external/googletest/googletest/Android.mk).

Bug: 78933670
Test: CDPATH=. NDK_ROOT=test m; check out/soong.log
Change-Id: Icce43d7e31ed5e5e1fb7a4e37fd4dfbf421af4b1
2018-05-01 10:07:50 -07:00
Jiyong Park
441a47d1c9 CompilerDeviceProperties are added to the sdk impl library
java_sdk_library now accepts properties in CompilerDeviceProperties,
such as dex_preopt.profile. The properties are passed to the impl
library which is the device-specific sub-component of a
java_sdk_library.

Bug: 77575606
Test: m -j
Change-Id: I7303068bb62ca860352db306a5462fa4453ee80f
2018-05-02 01:25:10 +09:00
Jiyong Park
551381c9c3 Add hidden_api_packages to java_sdk_library am: 5a2c9d7a46
am: 95432df502

Change-Id: Ib6a6d4af5d015de3df8c7ae962564a74204690bb
2018-05-01 09:15:11 -07:00
Jiyong Park
95432df502 Add hidden_api_packages to java_sdk_library
am: 5a2c9d7a46

Change-Id: I2d59f1498eb7c8d04cb2de88bfc2708be1f7ffe8
2018-05-01 09:10:38 -07:00
Jiyong Park
5a2c9d7a46 Add hidden_api_packages to java_sdk_library
hidden_api_packages is used to set packages that must be hidden from the
API. org.apache.http.legacy will be using this to exclude
references to com.android.okhttp from its API signatures.

Bug: 77575606
Test: m -j
Change-Id: Ic93c67cab96585638921dc922f175e545a68ead2
2018-05-01 22:25:41 +09:00
Anton Hansson
212f52008e Add some friendly error messages for java_sdk_library. am: 8959e149b7
am: fc3f21e609

Change-Id: I43e16f42be1e13eff69035cd3862dacce7f95b43
2018-05-01 00:04:23 -07:00
Anton Hansson
fc3f21e609 Add some friendly error messages for java_sdk_library.
am: 8959e149b7

Change-Id: Ic149e3ba2f6ef398de9b3adf40d85f88f4f260a7
2018-04-30 23:59:55 -07:00
Anton Hansson
8959e149b7 Add some friendly error messages for java_sdk_library.
The stubs will always fail to build without at least these
three arguments. Give a clear error message when this happens
instead of failing further into the build.

Bug: 77575606
Test: make <x>.stubs for sdk_library "x" without these args
Change-Id: If3142ecc73d6428f7e3120788f8de64d56a777ad
2018-05-01 07:49:03 +01:00
android-build-prod (mdb)
4ed0841ed1 Merge changes I9f68c887,Ic18f2dc5 am: b6ffb625eb
am: 07b758e2cf

Change-Id: I2cacae235b58dd0e9e1aaa65d0551517a90493f4
2018-04-30 19:09:34 -07:00
android-build-prod (mdb)
07b758e2cf Merge changes I9f68c887,Ic18f2dc5
am: b6ffb625eb

Change-Id: I1a325caecf48547b15ad754b5d90e0ca2c1775bb
2018-04-30 19:04:24 -07:00
android-build-prod (mdb)
b6ffb625eb Merge changes I9f68c887,Ic18f2dc5
* changes:
  Fix data race when ALLOW_MISSING_DEPENDENCIES=true
  Document glob patterns
2018-05-01 01:56:06 +00:00
android-build-prod (mdb)
e448ef1d12 Merge "Use and export proguard flags from static dependencies" am: 1873f39223
am: 0591553c02

Change-Id: Ic037e560ffe449037e10dc2d8d8abf257a694729
2018-04-30 18:22:55 -07:00
Jiyong Park
6467022e17 java_sdk_library supports test as another API scope am: df13054c2a
am: d5ed585832

Change-Id: I333d0c668674b157ccf2e10e82b0b1d4ce41cb4f
2018-04-30 18:21:43 -07:00
android-build-prod (mdb)
0591553c02 Merge "Use and export proguard flags from static dependencies"
am: 1873f39223

Change-Id: I7a6666fab1224658986e6282f93757f3f9b1dc5b
2018-04-30 18:19:05 -07:00
Jiyong Park
d5ed585832 java_sdk_library supports test as another API scope
am: df13054c2a

Change-Id: I95cff0b8c54db5eba1bf12674e8b4bdf0e685774
2018-04-30 18:17:33 -07:00
android-build-prod (mdb)
1873f39223 Merge "Use and export proguard flags from static dependencies" 2018-05-01 01:07:24 +00:00
Colin Cross
d2343a331e Fix data race when ALLOW_MISSING_DEPENDENCIES=true
Missing dependencies were modifying a slice owned by a dependency,
which could cause a data race.  Return a copy instead.

Test: build with race detector enabled
Bug: 70706626
Change-Id: I9f68c887bee94348f3e11284c0833d2e04d62599
2018-04-30 16:19:31 -07:00
Colin Cross
645332d501 Document glob patterns
Bug: 71906438
Test: none
Change-Id: Ic18f2dc5d91b30ff2b5beb8047d98591ba70ee00
2018-04-30 16:19:31 -07:00
Colin Cross
89c31581a5 Use and export proguard flags from static dependencies
Export proguard flags from Android library modules, and use them
from static dependencies in Android apps when running proguard.
Also export them to Make.

Unlike Make, which concatentates all the exported flags from
dependencies, Soong dedups exported flags files.

Bug: 73724997
Test: m checkbuild
Change-Id: I8f86fecb09cbc591832ce67e8ecef551a6600349
2018-04-30 16:03:43 -07:00
Jiyong Park
5edf8e8580 Add prebuilt_etc_xml am: 5a8d1bee89
am: 6455f181e9

Change-Id: I00e8d1adf36a2b0a0dbd2979ecf0d7f574ae66e0
2018-04-27 10:29:03 -07:00
Jiyong Park
6455f181e9 Add prebuilt_etc_xml
am: 5a8d1bee89

Change-Id: I8b54e220fc8c926ff809fae180249dbffd8969b5
2018-04-27 10:25:18 -07:00
Jiyong Park
df13054c2a java_sdk_library supports test as another API scope
For each java_sdk_library module, three (possibly different) stubs libs
are created.

*.stubs: public APIs only
*.system.stubs: public APIs + @SystemApi
*.test.stubs: public APIs + @TestApi

Depending on the sdk_version (or LOCAL_SDK_VERSION) of the calling
module, stubs lib of the corresponding api scope is linked.

Bug: 77575606
Test: m -j
Change-Id: I1437c64460914dbfc349dbc31d6f3ef090f541e3
2018-04-28 02:16:54 +09:00
Jiyong Park
5a8d1bee89 Add prebuilt_etc_xml
prebuilt_etc_xml installs an xml file to <partition>/etc[/<subdir>] and
validates the xml file against the given DTD file before installing it.

This change also includes some fixes for prebuilt_etc which is the super
module of prebuilt_etc_xml:

1) The module is changed to arch-specific module as the prebuilts are only
for devices (installed under the etc dir), but not for hosts.

2) Dependency to android.Prebuilt is removed because android.Prebuilt is
intended to be used for the case when a module can exist as prebuilts,
source or both. These prebuilt_etc_* modules are prebuilt only.

3) srcs property which accepts a list of source files is changed to src
that only accepts single source file, which makes more sense for
prebuilts.

Bug: 65686190
Test: m -j (xml_test.go)
Change-Id: I40484f3f6615b99f6b8d43176db0c40c5bfd838e
2018-04-28 00:13:00 +09:00
Colin Cross
6301a56646 [automerger skipped] Add pom2mk -exclude
am: 8a32a05989  -s ours

Change-Id: I0af9daebdb8e765bc8e9a75ca92d735f6f212b1d
2018-04-26 12:51:05 -07:00
Colin Cross
cce62c7e8b [automerger skipped] Add pom2mk -regen
am: f84c8636d3  -s ours

Change-Id: Ia627e9b5a1910b1c2a1a42dd6ac98ec57317d067
2018-04-26 12:50:59 -07:00
Colin Cross
8a32a05989 Add pom2mk -exclude
Add an option to pom2mk to exclude modules by name.

Bug: 78300023
Test: cd prebuilts/sdk/current/support && pom2mk -regen Android.mk -exclude androidx.car_car
Change-Id: I083907ef364384aace524ced81820567f5075d76
Merged-In: I083907ef364384aace524ced81820567f5075d76
(manually cherry-picked from c7453caf2c0a94192d0f722f26e9552da953ef8f)
2018-04-26 13:24:51 -04:00