Commit graph

164 commits

Author SHA1 Message Date
Xin Li
65cb5c69ea Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: Ifca7b65f4e27bf14cdc30f72f790b0de90130bae
Change-Id: I3a39be5f0b8736de4822c6a14072c78d4e4ad89d
2020-08-29 01:17:45 -07:00
Treehugger Robot
90905c0c68 Merge "Make the default exec strategy for javac/r8/d8 remote local fallback." 2020-08-18 00:54:03 +00:00
Andrei Onea
23fea04e27 Rename class2greylist
Use a more inclusive name (go/hiddenapi-list-renaming).
Bug: 163797539
Test: atest class2nonsdklisttest

Change-Id: I1b72c243746dde9926a11d5a559b84e753e8fd4f
2020-08-13 17:33:14 +01:00
Ramy Medhat
2889166b6c Make the default exec strategy for javac/r8/d8 remote local fallback.
Test: presubmits
Change-Id: Ia67c2a1e13638db1fb9c93755ce72159767d46b4
2020-08-13 11:41:35 -04:00
Dan Willemsen
9f43597ff7 Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Adds a bpfix rule so that we can eventually remove the
product_variables.pdk definition, which is now always a no-op.

Test: treehugger
Change-Id: I830b54d419b59f6db1d4617b45e61a78234f57a7
Merged-In: I830b54d419b59f6db1d4617b45e61a78234f57a7
2020-08-11 01:11:44 +00:00
Jeongik Cha
816a23a50d Introduce AlwaysUsePrebuiltSdks
Instead of UnbundledBuild, use AlwaysUsePrebuiltSdks
to determine if java modules needs to be built against prebuilt sdks.
And rename UnbundledBuildUsePrebuiltSdks to AlwaysUsePrebuiltSdks to
express its behavior more correctly.(It can be orthgonal to "Unbundled")

Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage

Change-Id: I0be7265c1959d8774c295372cd7a9250169f6df9
2020-08-07 12:15:52 +09:00
Pete Gillin
84c3807b99 Enforce the legacy core/platform API restriction.
This change silently decides whether modules which depend on either
sdkPrivate or sdkCorePlatform get the legacy or the stable version of
the core/platform API, based on whether the module's name is on a
hard-coded list or not.

Test: m java
Test: make a target from the list when its entry is commented out, which correctly fails
Bug: 157640067
Change-Id: I15e5a6c2f07e73718803501d705de0d7ab9bec90
Merged-In: I15e5a6c2f07e73718803501d705de0d7ab9bec90
Merged-In: Iaa97ddaa015e8079fcb3426585c5101c7ec9e22a
(cherry picked from commit c0f4373106)
2020-07-23 09:06:52 +01:00
Treehugger Robot
8034eafbed Merge "Rename the Default* constants in java/config." am: 8f70db2b48 am: 98d8ee9bd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353886

Change-Id: Ibf0533b6bd01244d30c5df89aa849a7f8da6f777
2020-07-01 15:25:53 +00:00
Treehugger Robot
8f70db2b48 Merge "Rename the Default* constants in java/config." 2020-07-01 14:43:46 +00:00
Pete Gillin
0638dfcf94 Rename the Default* constants in java/config.
These values are used in two out of the many possible sdk_version
configurations, and therefore weren't really defaults in any
meaningful sense. Giving them more descriptive names makes the code
easier to follow.

Bug: 157640067
Test: m nothing
Change-Id: Icf38a9c0be2606ad0478929e1b40dfcee36cddef
2020-07-01 12:40:58 +01:00
Treehugger Robot
9e57eedbad Merge "Move gen-kotlin-build-file.sh to python" am: e9eacaa061 am: 46d1053e49
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1351107

Change-Id: I34404ace3cda9d908fe7354598bb3fafc414298c
2020-06-29 21:35:21 +00:00
Treehugger Robot
e9eacaa061 Merge "Move gen-kotlin-build-file.sh to python" 2020-06-29 21:12:45 +00:00
Colin Cross
9b1aa0cb86 Move gen-kotlin-build-file.sh to python
Kotlin common multiplatform sources support will require more
complexity in gen-kotlin-build-file.sh, move it to python instead.

Test: m checkbuild
Change-Id: I02312160ad781877f1fec971168331c0dcecf136
2020-06-26 22:41:34 -07:00
Chris Gross
5ea55cd054 Merge "Use a default exclude filter for JaCoCo in Soong." am: 8f3386e49b am: 8a203b5cd7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1349522

Change-Id: I9c99a709a0a930e4114682d00a38ddd7210a602b
2020-06-26 15:21:01 +00:00
Chris Gross
2f748692dd Use a default exclude filter for JaCoCo in Soong.
Instrumented builds should exclude certain classes from instrumenation
by default. (e.g. JaCoCo itself) Leverage the existing
DefaultJacocoExclusionFilter to do this.

Note: Two different default filters exist now (one for Make and one for
Soong), as they have different wildcard rules.

Test: EMMA_INSTRUMENT=true EMMA_INSTRUMENT_STATIC=true m -j32
TeleService and inspected the resulting temporary jar that was
instrumented to confirm that anything from org/jacoco was excluded.
Bug: 159748844

Change-Id: I5466b0a03957edfbe53971d5d1a7729fdb8337db
2020-06-25 16:45:44 +00:00
Pete Gillin
811814282d Merge "Split the core/platform API into stable and legacy versions." am: d7db79cc8b am: 5dbf9e09f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1322704

Change-Id: I731da4ed59432a67bdc3df124a8939bcf316aa0c
2020-06-09 16:37:21 +00:00
Pete Gillin
1f41dbff64 Split the core/platform API into stable and legacy versions.
For now, everything outside libcore still uses the legacy version.

Test: treehugger
Bug: 157640067
Change-Id: If5234e9ee533ff537926801a0af045d36b1caf01
2020-06-08 10:53:51 +01:00
Kousik Kumar
2b6185810a Merge "Add support for remote-execution / caching of jar/zip actions" am: c4cdba07d3 am: d996ff6a68
Change-Id: I41f544531788cfdf7a16560e24f27c9d31b186ad
2020-05-29 13:56:58 +00:00
Kousik Kumar
0f5e5c724e Merge "Add support for remote-execution / caching of signapk actions" am: 8f37ec82d9 am: f52d6420ea
Change-Id: I3c51e0ff23903ba101d2029a632f99fc8342c2d9
2020-05-28 19:06:40 +00:00
Kousik Kumar
366afc5011 Add support for remote-execution / caching of jar/zip actions
Test: Ran a build with `RBE_JAR="true" RBE_JAR_EXEC_STRATEGY="remote"
RBE_ZIP="true" RBE_ZIP_EXEC_STRATEGY="remote" ... use_rbe m` and that
succeeded.

Bug: b/156765207
Change-Id: Ia17b532fbb282be414adf879914870082dd0841b
2020-05-28 11:56:48 -07:00
Kousik Kumar
309b1c0da3 Add support for remote-execution / caching of signapk actions
Test: "RBE_SIGNAPK=true RBE_SIGNAPK_EXEC_STRATEGY=remote ... use_rbe m" on crosshatch-userdebug and
signapk targets worked
Bug: b/156765091

Change-Id: I4b8c21320c2f38914ef39d3d8f036d885fab4e72
2020-05-28 06:14:56 -07:00
Kousik Kumar
02332a2e8b Merge "Add support for remote-execution / caching of turbine actions" am: 97d095516e am: a858736c86
Change-Id: I3fd5bd5a82f6a69a57f0105ed4eb21ab45651a57
2020-05-27 04:17:07 +00:00
Kousik Kumar
1372c1b430 Add support for remote-execution / caching of turbine actions
Test: Ran a sample turbine action with:
RBE_TURBINE_EXEC_STRATEGY="remote" RBE_TURBINE="true" ... use_rbe m out/soong/.intermediates/external/protobuf/libprotobuf-java-micro/android_common/turbine/libprotobuf-java-micro.jar
and checked in reproxy_log.txt that remote-metadata had status SUCCESS.

Bug: b/156765475
Change-Id: I85c334e6998c6dd2a68460b3580d50fffd900e6f
2020-05-20 07:57:37 -07:00
Jaewoong Jung
eb899879a1 Merge changes from topic "prebuilt_apk_set" am: a3e8885658 am: c067b0280c
Change-Id: Id7848044c6a0bbf18c005fc04e037b8ae4345903
2020-05-15 12:54:15 +00:00
Sasha Smundak
a7856c0077 Implement android_app_set module
Bug: 152319766
Test: manual and builtin
Change-Id: Id0877476f9ae23311d92c0b59a9c568140ab4119
2020-05-14 19:01:11 -07:00
Treehugger Robot
fb1add1fd6 Merge "Refactor RBE support for Javac/R8/D8 to use the remoteexec package." am: 0b3b3db525 am: ebbe86fdb7
Change-Id: I1e1e35955cefcd26cfe58e9cd9f02c9465865442
2020-04-28 18:33:59 +00:00
Ramy Medhat
1dcc27e47c Refactor RBE support for Javac/R8/D8 to use the remoteexec package.
Test: build with and without RBE_JAVAC/RBE_R8/RBE_D8 set.
Change-Id: I1607f8cfb4d2c3cbb3672152bbeb561d9968bc60
2020-04-28 11:37:20 -04:00
Automerger Merge Worker
408483db04 Merge "Update ike.jar's name in code coverage configuration" am: 9a63ee1b4f am: 0c34e7e308
Change-Id: I7b707deb7b2e4914ea594aaa1b544c5fb4c4b059
2020-02-25 22:22:16 +00:00
evitayan
2e5606736f Update ike.jar's name in code coverage configuration
ike has been renamed to android.net.ipsec.ike. This commit applies
this name updates to the code coverage configuration.

Bug: 148625578
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false android.net.ipsec.ike.com.android.ipsec_intermediates/ contains jacoco-report-classes.jar
Change-Id: Ic46a1091899eb5bc9560739ec86a9bea08585075
2020-02-25 07:43:43 +00:00
Automerger Merge Worker
1bf59ab8ab Merge "Add support for experimentally enabling RBE support on specific rules." am: 5e0dbe4e3e am: 205edb5da3 am: a171ec4e95
Change-Id: I2922a3dd955162fa9f713ebfe9fe1852d76fd2c3
2020-01-28 20:31:14 +00:00
Ramy Medhat
8ea054a81e Add support for experimentally enabling RBE support on specific rules.
This CL adds RBE support to javac, r8, and d8 rules which is only
enabled if respective environment variables are set.

Test: an aosp_crosshatch build with and without the new variables.
Change-Id: Ic82f3627944f6a5ee7b9f3228170c2709b1bfcb8
2020-01-28 12:42:47 -05:00
Anton Hansson
91133e6e44 Add framework-sdkextensions to jars to instrument
Required to get code coverage.

Bug: 143937446
Test: verify LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR is set
      for framework-sdkextensions
Change-Id: I2cdb8ce60939a91f8473c2ddd2a8ff198cd7c92e
Merged-In: I2cdb8ce60939a91f8473c2ddd2a8ff198cd7c92e
(cherry picked from commit 9492b09dae)
2020-01-17 09:57:52 +00:00
Anton Hansson
9492b09dae Add framework-sdkextensions to jars to instrument
Required to get code coverage.

Bug: 143937446
Test: verify LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR is set
      for framework-sdkextensions
Change-Id: I2cdb8ce60939a91f8473c2ddd2a8ff198cd7c92e
2020-01-17 09:56:37 +00:00
Jeff Sharkey
38338a951d Move MediaStore.java inside APEX boundary.
Recent work has paved the way to get MediaStore.java building against
"core_platform", and this change is actually shifting MediaStore.java
inside the MediaProvider APEX boundary.

This involves defining a new "updatable-mediaprovider" library JAR
and ensuring that it's spliced into classpaths where needed to keep
everything building and working.

Note that the MediaProvider APK itself is still bundled, so we're
manually including the MediaStore.java when building that APK so that
we can continue referencing @hide symbols, but there's a STOPSHIP
comment to remove that once we get the APK building against
"system_current".

Bug: 144247087
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I6d6da165848b934f4ca7ecfca7b97de6f97897e3
2019-12-19 22:16:04 +00:00
Jiyong Park
231d056d50 Add updatable_media_stub to framework
The module framework is now a build-only library whose purpose is to
provide hidden APIs from the non-updatable part of the platform and APIs
from the modules. Merging updatable_media_stub to framework, like the
stub libraries from other modules.

As a result, updatable_media_stub can be removed from DefaultLibraries.

Bug: N/A
Test: m

Exempt-From-Owner-Approval: cherry-pick from internal

Merged-In: I7f80716119ad6ac627e5666def9fe17112dcde3b
(cherry picked from commit 4c258d282b)
Change-Id: I7f80716119ad6ac627e5666def9fe17112dcde3b
2019-12-19 11:57:47 +09:00
Jiyong Park
4c258d282b Add updatable_media_stub to framework
The module framework is now a build-only library whose purpose is to
provide hidden APIs from the non-updatable part of the platform and APIs
from the modules. Merging updatable_media_stub to framework, like the
stub libraries from other modules.

As a result, updatable_media_stub can be removed from DefaultLibraries.

Bug: N/A
Test: m
Change-Id: I7f80716119ad6ac627e5666def9fe17112dcde3b
2019-12-18 17:28:17 +09:00
Automerger Merge Worker
e2e6c72cd7 Merge "Enable covergae for ike.jar which will be in mainline module IPsec(IKE)" am: fa2ac9f6e9 am: abd4fde926 am: d04d769639
Change-Id: I891237f0e8cedba332a8fd1ef5789d1a92632ce6
2019-12-18 01:41:09 +00:00
evitayan
13b0d51ffb Enable covergae for ike.jar which will be in mainline module IPsec(IKE)
Enable jacoco for ike.jar to set up code coverage. ike will be
shipped in mainline module com.android.ipsec

Bug: 146012420
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false
Change-Id: I886551d980c0d9651b11c80051f17609bb3531d8
2019-12-17 15:23:38 -08:00
Martin Stjernholm
213d6533cc Merge "Move/dedupe some host path functions in package_ctx.go." am: 455e3a089d am: 47a7da1485
am: 1c0a6ebb26

Change-Id: I72f384073fff467ba53a8dea9422b4296605bb26
2019-12-09 16:14:37 -08:00
Martin Stjernholm
7260d066ea Move/dedupe some host path functions in package_ctx.go.
These functions don't need a PackageContext object.

Test: m
Bug: 145934348
Change-Id: Ia1da2c76cbad292f9ca79617199b2b5b6b265568
2019-12-09 22:04:21 +00:00
Pete Gillin
1209d7ebbc Merge changes I0d679648,I31542e7f am: 31d57588c9 am: 6414dde54e
am: 176de85374

Change-Id: I06ce4efde1122b79b757cef2985ac4ecabad80a6
2019-11-11 10:28:06 -08:00
Pete Gillin
a7a3d64a36 Remove the EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN option.
Previously, this setting environment variable to false reverted to an
OpenJDK 9 toolchain. This change removes that option.

Test: m core-all-system-modules
Test: zcat out/verbose.log.gz | grep 'prebuilts/jdk/jdk[0-9]*'
Test: EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=false m core-all-system-modules (fails)
Bug: 131683177
Change-Id: I0d679648e1236925ce3ef7e1652379127e846b00
2019-11-11 11:03:58 +00:00
Pete Gillin
a2affbbb00 Add a new option OVERRIDE_JLINK_VERSION_NUMBER.
This is a counterpart to the existing OVERRIDE_ANDROID_JAVA_HOME,
which is not very useful by itself in a Java module world. All jlink
commands will fail if a user sets OVERRIDE_ANDROID_JAVA_HOME without
setting OVERRIDE_JLINK_VERSION_NUMBER to the corresponding value
(unless they happen to be specifying a different OpenJDK 11
toolchain).

Test: OVERRIDE_ANDROID_JAVA_HOME=my-jdk10 OVERRIDE_JLINK_VERSION_NUMBER=10 m core-all-system-modules (with an OpenJDK 10 toolchain symlinked at my-jdk10 just for testing)
Test: zcat out/verbose.log.gz | grep 'jmod create'
Bug: 131683177
Change-Id: I31542e7f46303bba538d998171a3efe6d0215c7b
2019-11-08 12:34:07 +00:00
Allen Hair
74cd286e42 Instrument framework-minus-apex for coverage.
After ag/9580351, the framework classes are produced by the
framework-minus-apex module instead. Update the
InstrumentFrameworkModules list to include framework-minus-apex so the
framework classes are instrumented by the coverage build.

Bug: 144105776
Test: ./build/soong/soong_ui.bash --make-mode SKIP_ABI_CHECKS=true TARGET_PRODUCT=cf_x86_phone TARGET_BUILD_VARIANT=userdebug droid dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true NATIVE_COVERAGE=true SKIP_BOOT_JARS_CHECK=true
Change-Id: I26b5f4df4a61d2264d9e177941aed4ca85baa90d
2019-11-07 15:09:15 -08:00
Pete Gillin
abbcddaaf4 Switch to an OpenJDK 11 toolchain by default.
Prior to this change, the default was to use and OpenJDK 9 toolchain,
with the EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=true environment
variable available to opt into OpenJDK 11. After this change, the
default is to use OpenJDK 11, with
EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=false available to opt out.

This change affects:
 - The version of javac used.
 - The version of javadoc used.
 - The version of other tools used during the build process (e.g. jar,
   jmod, and jlink).
 - For Java bytecode executed on the host, the version of the java
   executable used, and so the versions of the JVM and the OpenJDK
   libraries in the system module (or bootclasspath).

This change does not affect:
 - The Java language level, i.e. the version of Java expected in
   source code (the -source option to javac) or the version of Java
   bytecode produced (the -target option to javac).
 - Anything to do with code execution on the device.

Bug: 131683177
Test: make java droid docs cts tests
Test: zcat out/verbose.log.gz | grep 'prebuilts/jdk/jdk[0-9]*'
Test: make RunBluetoothRoboTests RunCarSettingsLibRoboTests
Test: cts-tradefed help
Test: atest CtsHostTzDataTests
Test: atest CtsLibcoreTestCases
Change-Id: I09dc22f1af4d1f2d7d3b85c08cb0ed9a1105aaca
Merged-In: Iaae89ef25c92ec099575c026fc50e41da4e143e8
2019-11-05 11:33:58 +00:00
Pete Gillin
4fd368316e Switch to an OpenJDK 11 toolchain by default.
Prior to this change, the default was to use and OpenJDK 9 toolchain,
with the EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=true environment
variable available to opt into OpenJDK 11. After this change, the
default is to use OpenJDK 11, with
EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=false available to opt out.

This change affects:
 - The version of javac used.
 - The version of javadoc used.
 - The version of other tools used during the build process (e.g. jar,
   jmod, and jlink).
 - For Java bytecode executed on the host, the version of the java
   executable used, and so the versions of the JVM and the OpenJDK
   libraries in the system module (or bootclasspath).

This change does not affect:
 - The Java language level, i.e. the version of Java expected in
   source code (the -source option to javac) or the version of Java
   bytecode produced (the -target option to javac).
 - Anything to do with code execution on the device.

Bug: 131683177
Test: make java droid docs cts tests
Test: zcat out/verbose.log.gz | grep 'prebuilts/jdk/jdk[0-9]*'
Test: make RunBluetoothRoboTests RunCarSettingsLibRoboTests
Test: cts-tradefed help
Test: atest CtsHostTzDataTests
Test: atest CtsLibcoreTestCases
Change-Id: Iaae89ef25c92ec099575c026fc50e41da4e143e8
2019-11-01 14:46:58 +00:00
Pete Gillin
1f52e93db2 Add experimental option to use OpenJDK 11 toolchain.
With this change, setting the environment variable
EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN=true switches from the OpenJDK 9
toolchain to the OpenJDK 11 one (prebuilts/jdk/jdk11).

Since the version of the java.base module has to match the version of
the jlink tool which consumes it, the --module-version argument to the
jmod create call is also switched.

Test: make
Test: EXPERIMENTAL_USE_OPENJDK11_TOOLCHAIN make
Bug: 131683177
Change-Id: I606d22538165f309fe5537bd67a26390b1dd5771
2019-10-09 18:38:14 +01:00
Colin Cross
6617b6d624 Merge "Use prebuilts for more tools in unbundled builds" 2019-09-09 17:21:44 +00:00
vichang
adf1a128b0 Merge "Add new core-icu4j after separating icu4j from core-libart"
am: dfee9b4364

Change-Id: Ia46581e56d89d19e06511f9df6eedf8a5ea0d785
2019-08-12 09:11:38 -07:00
Colin Cross
bdf9514e45 Use prebuilts for more tools in unbundled builds
Move the logic from Make that uses prebuilts for more tools for
unbundled builds, and export the values back to make.

Test: m checkbuild
Change-Id: I8c7031e0feaa9328a2b73db6dc8e63e12d1d12f7
2019-08-08 12:56:34 -07:00