aboutsummaryrefslogtreecommitdiff
path: root/java/java.go
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | | | | Merge "Add support for remote-execution / caching of jar/zip actions"Kousik Kumar2020-05-291-4/+10
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | |
| * | | | | | | | | | | | | | Add support for remote-execution / caching of jar/zip actionsKousik Kumar2020-05-281-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | | | | | | | | apex respects stem of java_library modulesJiyong Park2020-05-281-2/+2
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apex now respects stem of java_library modules. As a follow-up we need to suppor the same for other types of modules. Bug: 157638999 Test: m Change-Id: Iaf5023020b5440f1ffd4f5414b5a7864655fc22a
* | | | | | | | | | | | | | Merge "Allow the user to explicitly set the java Uncompress_dex property."David Srbecky2020-05-271-6/+14
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | |
| * | | | | | | | | | | | | Allow the user to explicitly set the java Uncompress_dex property.David Srbecky2020-05-211-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ART tests need to explicitly control the compression. Bug: 157239179 Test: "atest ArtGtestsTarget" with http://go/aog/1302773 Change-Id: I4490aa0a61fa71f830feb6a46dffd8d20fccfc66 Merged-In: I4490aa0a61fa71f830feb6a46dffd8d20fccfc66
* | | | | | | | | | | | | | Merge "AIDEGen: Add path attribute to okhttp module."Treehugger Robot2020-05-271-0/+7
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | |
| * | | | | | | | | | | | | AIDEGen: Add path attribute to okhttp module.bralee2020-05-211-0/+7
| |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 157115477 Test: 1. aidegen Settings -n open merged_module_info.json "okhttp": { ... "path": ["external/okhttp"] }, modules: "mimemap-testing-res.jar", "mimemap-res.jar" "services.core.priorityboosted", "framework-tethering" "bouncycastle_ike_digests", "robolectric-sqlite4java-native" have the 'path' attribute. Change-Id: If3628887866c29dcc948dd427727f175a5199edc
* / / / / / / / / / / / / Improve tracking of exported sdk librariesPaul Duffin2020-05-211-6/+27
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build tracks the java_sdk_library/_import modules that are referenced by libraries so that it can ensure that any Android app that includes code that depends on one of those modules has the appropriate <uses-library> entry in their manifest. Unfortunately, there were a couple of issues with that: 1) It only tracks direct references to the java_sdk_library module itself, e.g. android.test.mock. Direct references to the stubs module, e.g. android.test.mock.stubs were not tracked. Making it possible for Android apps to reference libraries which would not be available at runtime. 2) The logic for determining whether something was a java_sdk_library was repeated in a number of places making it difficult to allow java_sdk_library/_import instances to determine whether they should be treated as an Android shared library. 3) It tracks (and could use) even those java_sdk_library instances which do not represent a shared library, e.g. the ones that set api_only: true. While this change will simplifty fixing that the actual issue will be fixed in a follow up change. Changes: * Added EmbeddableSdkLibraryComponent and embedded it into java_sdk_library/_import, java_library and java_import. It provides the common code to minimize duplication. It contains an SdkLibraryToImplicitlyTrack field that if set will cause any references to the containing module to add the SdkLibraryParent to the list of implicit sdk libraries being tracked. * Changed code that assumed that anything that implemented SdkLibraryDependency required tracking to use the OptionalImplicitSdkLibrary() method to get the optional name of the sdk library to track. That will allow a follow up change to return nil from that method to exclude an sdk library from being tracked. * Moved SdkLibraryDependency from java.go to sdk_library.go as that is a better place for it to be. * Changed the stubs java_library/java_import creation code to initialize the SdkLibraryToImplicitlyTrack field with the name of the creating module. * Initialized the SdkLibraryToImplicitlyTrack field in the java_sdk_library/_import so that direct references to them will be tracked too. * Added tests to verify that direct access to the .stubs child of both java_sdk_library and java_sdk_library_import are tracked properly. Test: atest CtsProviderTestCases - which relies on android.test.mock being implicitly tracked to verify that I had not broken anything. Used aapt2 dump badging to read the manifest. m nothing - to run the new tests which failed before fixing the code. Bug: 156723295 Change-Id: Ia99def91e9b74d2ed0a777de04b476c00ea0393d
* | | | | | | | | | | | Merge "Use system modules for prebuilt SDKs >=30"Colin Cross2020-05-181-12/+5
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | |
| * | | | | | | | | | | Use system modules for prebuilt SDKs >=30Colin Cross2020-05-151-12/+5
| | |_|_|_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prebuilt SDKs >=30 now contain core-for-system-modules.jar, convert them to system modules and use them when compiling against the SDK to allow using javac -source 1.9 -target 1.9. Bug: 117069453 Test: TestClasspath Change-Id: Iebadad5980b952ed91c3ffd56cff1ce1827d3247 Merged-In: Iebadad5980b952ed91c3ffd56cff1ce1827d3247
* | | | | | | | | | | Merge "Add test_mainline_modules to the auto-gen test ↵Treehugger Robot2020-05-181-0/+4
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | config(AndroidJUnitTest only)."
| * | | | | | | | | | Add test_mainline_modules to the auto-gen test config(AndroidJUnitTest only).easoncylee2020-05-151-0/+4
| | |_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support parameterized mainline modules in Test Mapping, we plan to add a new parameter called test_mainline_modules in build system to auto-generate the test config based on the parameter. For detailed information: go/test-mapping-mainline-gcl (search for auto-generated pattern) Bug: 155238134 Test: add "test_mainline_modules: [some.apk]" to TetheringTests, and build the modules, confirm the parameterized option is added in the test config. Change-Id: I41ba8749ce46da62db402a8b8a555d4874e1cfc0
* | | | | | | | | | Extract common behavior between Module and ImportPaul Duffin2020-05-171-10/+24
| |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the duplication being eliminated here is minimal follow up changes will add more functionality that is common to Module and Import. Test: m nothing Bug: 156723295 Change-Id: I1733405526764272beba63470a9bc8a958d41024
* | | | | | | | | Don't use SDK variant for vendor JNI librariesColin Cross2020-05-131-2/+1
| |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vendor JNI libraries already have stable APIs enforced by the VNDK, they shouldn't use SDK variants. Bug: 156225490 Test: TestJNISDK Change-Id: I21ba67e8e9fb05016caf5888129adc1a939545c2
* | | | | | | | java_sdk_library: Delegate component module to naming schemePaul Duffin2020-05-131-0/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a naming scheme abstraction to which the java_sdk_library/import will delegate the task of creating the names of their component modules. The naming scheme can be selected in a module definition but for now the only supported option is "default". Test: m nothing Bug: 155480189 Change-Id: I708657661188ea4a14a4dd8c6bc4b46237bbe5e0
* | | | | | / Retry: Detect invalid arch specific properties in snapshotPaul Duffin2020-05-081-1/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the snapshot code did not know whether a specific property could be arch specific or not and assumed that they all were which meant that it could generate snapshots containing arch specific values for properties that are not arch specific and so would fail when unpacked. This change requires arch specific fields in SdkMemberProperties to be tagged as such using `android:"arch_variant"` (just as in module input property structures). Any property without that must have properties that are common across all variants. Bug: 155628860 Test: m nothing Change-Id: I3df60f0b53ba02ec2c55a80c7da058eac5909d26
* | | | | | Revert "Detect invalid arch specific properties in snapshot"Greg Kaiser2020-05-081-1/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert submission 1302576 Bug: 156054601 Reason for revert: Presumed root cause of build break. Reverted Changes: Ifc8116e11:Detect invalid arch specific properties in snapsho... I7ebd33307:Adds support for 'ignored-on-host' I167b47a13:Fix snapshot of a host/device cc_library with stub... Change-Id: Id7eba0bdde5c579e10e9b42d94a7cfab5f34995f
* | | | | Detect invalid arch specific properties in snapshotPaul Duffin2020-05-071-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the snapshot code did not know whether a specific property could be arch specific or not and assumed that they all were which meant that it could generate snapshots containing arch specific values for properties that are not arch specific and so would fail when unpacked. This change requires arch specific fields in SdkMemberProperties to be tagged as such using `android:"arch_variant"` (just as in module input property structures). Any property without that must have properties that are common across all variants. Bug: 155628860 Test: m nothing Change-Id: Ifc8116e11d987cfe7aec2eeaa964f3bbf36b5dc2
* | | | Introduce min_sdk_version to deps info.Artur Satayev2020-05-041-0/+8
| |_|/ |/| | | | | | | | | | | | | | Bug: 149622332 Test: m Change-Id: Ie6568cb8a82d5cca9a3dc91b5a068abf4b0632dc
* | | Merge "Ensure APEX's Java deps use stable SDKs."satayev2020-05-041-0/+8
|\ \ \
| * | | Ensure APEX's Java deps use stable SDKs.Artur Satayev2020-04-271-0/+8
| |/ / | | | | | | | | | | | | | | | Test: m Bug: 153333044 Change-Id: Ib1acf3073e96fe23c92d292ec0b1a91e2cd408db
* | | Revert "[soong] new field in Android.bp to request APK signing V4"Songchun Fan2020-05-011-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 17d69e3484d2e74f28721e86a6554c3d0d740a51. Reason for revert: This new field is not useful without dependencies in aosp Test: builds Change-Id: I87bd820cd6dbc5274ce3d28c4578381718aa805d Merged-In: I70d6f7dc751510311b03e245b2189a76b395a49c
* | | Add defaults support to runtime_resource_overlay.Jaewoong Jung2020-04-281-0/+1
|/ / | | | | | | | | | | | | | | | | (This is a cherry-pick change.) Bug: 154956723 Test: app_test.go Change-Id: Ida29035ef45ec188c95a07a8bccaaa77eea486d7 Merged-In: Ida29035ef45ec188c95a07a8bccaaa77eea486d7
* | Merge "Repeat kapt processor argument for multiple processors"Treehugger Robot2020-04-241-2/+3
|\ \
| * | Repeat kapt processor argument for multiple processorsColin Cross2020-04-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kapt claims to support a comma separated list of annotation processors, but it errors if multiple annotation processors are given. Surrounding the the list with {} does not error, but it also doesn't even warn if the second element in the list is garbage, so it may not be running the second processor. Repeat the processor argument for each annotation processor class instead. Bug: 154736649 Test: TestKapt Test: m checkbuild Change-Id: I4c7c161dbf867d7fba1aaf16fd5e502647e3f682
* | | Check updatable APKs compile against managed SDKs.Artur Satayev2020-04-151-11/+15
|/ / | | | | | | | | | | | | | | As a follow up, this property will be set to APKs participating in mainline program. Bug: 153333044 Test: m Change-Id: I6ea2f3c1d26992259e4e9e6a6d8cecf091d39c43
* | Stop requiring apex_available on java_library members of sdksPaul Duffin2020-04-081-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, adding java_library to an sdk required that the names of any APEXes that transitively compiled against it were added to its apex_available property. This change removes that requirement. Also corrects the dependency path in the TestApexAvailable_IndirectDep error which previously passed through "shared from static" static dependency tags even though those are explicitly NOT followed when checking apex_available settings. Bug: 152878661 Test: m droid Change-Id: I995ed38956c1bc210b09494812de012fed9f9232
* | Merge "[soong] new field in Android.bp to request APK signing V4"Treehugger Robot2020-04-051-0/+4
|\ \
| * | [soong] new field in Android.bp to request APK signing V4Songchun Fan2020-04-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If "v4_signature: true" is set, the v4 signature file, named [outputApkFile].idsig will be generated along side the outputApkFile. Test: m nothing Test: atest PackageManagerShellCommandIncrementalTest BUG: 149354175 Change-Id: Ie84725a15406f96f65042ea9909460e4eb34d57f Merged-In: Ie84725a15406f96f65042ea9909460e4eb34d57f
* | | Add a Tag field to dist to dist a tagged outputAnton Hansson2020-03-311-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make java_library support this mode of output, to allow callers to dist the classes.jar file rather than the dexed jar file. Bug: 152618077 Test: followup CL Change-Id: I5ba6949833a0fbb95376142aec5096ff5f084c00 Merged-In: I5ba6949833a0fbb95376142aec5096ff5f084c00 (cherry picked from commit 1e65f94a4b2cc7dea1896937c2068b87c899c465)
* | | Add code coverage support to android_app JNI libs.Jaewoong Jung2020-03-271-3/+4
|/ / | | | | | | | | | | Test: Built mainline module coverage data Bug: 152117890 Change-Id: I47bf3e5d6e78c4518729bdb52616e248156d3cec
* | Merge "Make system_server stubs consistent with other stubs"Anton Hansson2020-03-251-1/+1
|\ \
| * | Make system_server stubs consistent with other stubsAnton Hansson2020-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include the module_api stubs in system_server one instead of putting both of these jars on the classpath. Also rename it to be in line with the other stubs. Bug: 149293194 Test: m Exempt-From-Owner-Approval: approved internally Change-Id: Iead5af4152a49cd59a4fd7afc0312c2f0c872c1e Merged-In: Iead5af4152a49cd59a4fd7afc0312c2f0c872c1e (cherry picked from commit bbd78556daf4a7e015f2e3ddfe9539909e9ebf40)
* | | add aidl.export_include_dirs to java_import module typeJiyong Park2020-03-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | This allows a java prebuilt to export AIDL files to its clients. Bug: 151933053 Test: m Change-Id: I21b5d5ce647141a7c76f62490adbccb858b10323
* | | Merge "Simplify the construction of class loader contexts for system server ↵Ulyana Trafimovich2020-03-231-47/+0
|\ \ \ | | | | | | | | | | | | jars."
| * | | Simplify the construction of class loader contexts for system server jars.Ulya Trafimovich2020-03-231-47/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reworks CL https://r.android.com/1180134 as follows: 1) Do not reorder the list of system server jars passed from Make to Soong via the product variable PRODUCT_SYSTEM_SERVER_JARS. This means that for some products the order of jars on the system server classpath may be non-optimal: a jar X that depends on Y may be dexpreopted before Y, so that all references to the classes and methods from Y wil be unresolved. Unfortunately for such products, fixing the order is not a simple matter of rearranging their PRODUCT_SYSTEM_SERVER_JARS, because the conflicts may arise when the product-specific variable gets merged with the common variable. 2) As a consequence of 1), do not add artificial dependencies between system server jars: this is now impossible, as it would create circular dependencies for those products that have non-optimal order of jars. 3) Copy dex files for system server jars to a predefined build location. This is necessary because at the time when Soong generates class loader context for k-th jar, it needs to know the paths to jars 1 .. (k-1), and it might have not processed those jars yet (so Soong can't query the paths from the modules). This approach is similar to the way Soong handles bootclasspath jars. 4) Do not exclude from dexpreopting system server jars that are not Soong modules (those that are Make modules). The previous CL excluded them because Make modules do not have ModuleContext. But it turns out that ModuleContext is not necessary, as all the information is passed via the dexpreopt config. Test: aosp_walleye-userdebug boots and there are no messages in the logcat regarding class loader context mismatch: $ adb logcat | grep 'mismatch' # empty Test: Class loader contexts in the oat files for system server jars match expectations: $ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/com.android.location.provider.odex 2>/dev/null | grep '^classpath' classpath = PCL[] $ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/services.odex 2>/dev/null | grep '^classpath' classpath = PCL[/system/framework/com.android.location.provider.jar*1989208671] $ oatdump --oat-file=out/target/product/walleye/system/framework/oat/arm64/ethernet-service.odex 2>/dev/null | grep '^classpath' classpath = PCL[/system/framework/com.android.location.provider.jar*1989208671:/system/framework/services.jar*4040443083:/system/framework/services.jar!classes2.dex*2210087472] Test: The phone boots and logcat has no scary messages related to class loader contexts: $ lunch aosp_walleye-userdebug && m $ adb reboot bootloader && fastboot flashall -w && adb wait-for-device $ adb root $ adb shell stop $ adb logcat -c $ adb shell setprop dalvik.vm.extra-opts -verbose:oat $ adb shell start $ adb logcat | egrep -io 'system_server: .*load.*/system/framework.*' system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 0 system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 0 system_server: Loading /system/framework/oat/arm64/services.odex with executable: 0 system_server: Successfully loaded /system/framework/oat/arm64/services.odex with executable: 0 system_server: Loading /system/framework/oat/arm64/ethernet-service.odex with executable: 0 system_server: Successfully loaded /system/framework/oat/arm64/ethernet-service.odex with executable: 0 system_server: Loading /system/framework/oat/arm64/wifi-service.odex with executable: 0 system_server: Successfully loaded /system/framework/oat/arm64/wifi-service.odex with executable: 0 system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1 system_server: Loading /system/framework/oat/arm64/services.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/services.odex with executable: 1 system_server: Loading /system/framework/oat/arm64/ethernet-service.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/ethernet-service.odex with executable: 1 system_server: Loading /system/framework/oat/arm64/wifi-service.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/wifi-service.odex with executable: 1 system_server: Loading /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1 system_server: Successfully loaded /system/framework/oat/arm64/com.android.location.provider.odex with executable: 1 Bug: 141785760 Bug: 140451054 Bug: 148944771 Bug: 147017252 Change-Id: I33c4087f8bfacd0ecb89877aa150b75360d06710 Merged-In: I33c4087f8bfacd0ecb89877aa150b75360d06710 (cherry picked from commit a4a83b0ef9b9769681ad285290fdbbf043eff3d5) Exempt-From-Owner-Approval: cherry-pick.
* | | Improve consistency of handling java snapshot propertiesPaul Duffin2020-03-231-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, java snapshot properties (java_library and java_test) relied on the properties not being optimized when there was a single os type and instead being added directly to the common os type properties. However, that means that the behavior is inconsistent for other member types depending on whether there was one os type or not. This change updates the java sdk member handling to support optimization. This involved: 1) Adding AidlIncludeDirs field to librarySdkMemberProperties to specify the aidl include dirs instead of extracting that from the library field. 2) Renaming jarToExport to JarToExport (in both library/testSdkMemberProperties)to allow it to be optimized. 3) Adding MemberType() and Name() methods to SdkMemberPropertiesContext to avoid having to store the former in the properties struct and retrieve the latter from the library/test fields. 4) Removing the now unused library/test fields from the properties structures. 5) Separating the processing of the jar/test config in AddToPropertySet(...) as they may be optimized separately. 6) Ditto for the jar/aidl include dirs. 7) While doing this work I noticed that although the contents of the aidl include dirs are copied into the snapshot the java_import does not make use of them. Raised bug 151933053 and added TODO to track that work. Bug: 142935992 Test: m nothing Change-Id: Iba9799e111ca5672b2133568163d8c49837ba9cd
* | | Make new module creation API more flexiblePaul Duffin2020-03-231-8/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously passing additional information to the implementations of AddPrebuiltModule() or the SdkMemberProperties interface would have required making changes to the API. This change added an SdkMemberContext object into which additional information can easily be added without requiring changes to existing implementations. The BuildSnapshot() method was not modified because it is deprecated and will be removed in a follow up change. It also switches the API from passing variants as android.SdkAware to android.Module. That is for a couple of reasons: 1) SdkAware is designed for managing the relationship between the module and the SDK, not for generating the output snapshot. As such there is nothing in SdkAware that is needed for generating the output snapshot. 2) Accepting android.Module instead makes it easier to use the underlying code for generating the snapshot module as well as the individual member modules. This is in preparation for a number of improvements and bug fixes in both the snapshot creation code and implementations to address found while trying to built the platform against ART prebuilts. Bug: 151937654 Test: m nothing Change-Id: Iac10f1200c0f283aa35402167eec8f9aeb65a38e
* | Fix apex_availableJooyung Han2020-03-101-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking apex_available was missing some corner cases. For example, the deps of share deps of cc_library modules are missed while those from cc_library_shared are correctly tracked. This was due to.. * calling DepIsInSameApex in WalkDeps: both work fine separately, but when they are used together, it fails to work. It's due to how WalkDeps works. (We might fix this bug too risky since it is used very widely) * incorrect receiver for DepIsInSameApex in apex_deps mutator: receiver is supposed to be parent, but child was used before. Interestingly lots of deps are within the same group of module types(cc to cc, java to java), it has worked. (note that receiver's DepIsInSameApex implementation can be different). This change fixes them by.. * walkPayloadDeps is now relying on ApexVariation, which is calculated correctly by TopDown apex_deps mutator. * use correct receiver for DepIsInSameApex in apex_deps mutator, which requires for java.SdkLibrary to override the method and for java.Library/Import to use passed dep instead of receiver to check its membership of sdk. Bug: 151071238 Test: build/boot Change-Id: I0569ef4bb8e79635e4d97a89f421a8d8b7d26456
* | Add support for multiple os typesPaul Duffin2020-03-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the member snapshot creation code to support multiple os types. It basically sorts the variants by os type, then applies the code to optimize the arch properties and then it optimizes the properties that are common across architectures and extracts any properties that are common across os types. The java and cc member types needed to be modified to make the location of the generated files within the snapshot os type dependent when there is more than one os type. That was done by adding an OsPrefix() method to the SdkMemberPropertiesBase which returns the os prefix to use when there is > 1 os type and otherwise returns an empty string. Added three tests, one for cc shared libraries, one for cc binary and one for java header libraries. Bug: 150451422 Test: m nothing Change-Id: I08f5fbdd7852b06c9a9a2f1cfdc364338a3d5bac
* | Refactor java_library/java_test snapshot processingPaul Duffin2020-03-051-43/+70
| | | | | | | | | | | | | | | | | | | | Adds support for handling the common arch to the sdk module type snapshot generation code and then refactors the java_library and java_test snapshot processing to take advantage of that. Bug: 150451422 Test: m nothing Change-Id: If746f375f1c4288ab6b67c7d216593b70258b043
* | Simplify java library sdk member codePaul Duffin2020-03-021-41/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the accessor function for retrieving the impl/header jars to the librarySdkMemberType structure instead of passing it into its buildSnapshot() method. That enabled: * The removal of the [header/impl]LibrarySdkMemberType structs. * The removal of their implementations of BuildSnapshot. * Replacing buildSnapshot() with BuildSnapshot() This will make subsequent refactoring of the SdkMemberType interface a little simpler. Test: m nothing Bug: 150451422 Change-Id: I1f96986bb497cf9d9df9916e40065f66b35a4704
* | Merge "Use header jar without jarjar for sharded classpath"Treehugger Robot2020-02-281-8/+11
|\ \
| * | Use header jar without jarjar for sharded classpathColin Cross2020-02-211-8/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Sharding uses the header jar of all of the classes of the module with the sources of a subset, but was incorrectly used the jarjar version of the header jar, which may have renamed some of the classes. Fixes: 149969343 Test: m framework-minus-apex Change-Id: I568c939f8030d3ddc1e7fa8796cffcac4d6172e8 Merged-In: I568c939f8030d3ddc1e7fa8796cffcac4d6172e8 (cherry picked from commit f5a6628b27ab67cba0aa5fd153973cc5d704a366)
* | Expect added members for instrumented modulesJiyong Park2020-02-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hiddenapi expects that all members in a class to have corresponding hidden API flags. However, this can't be satisfied when the java module having the class is instrumented; JaCoCo added a few number of synthetic members. In this case, give 'no-force-assign-all' option to the hidden api tool so that it doesn't complain about the synthetic methods. Also, disabling instrumenting jacocoagent itself, because it doesn't make sense. Exempt-From-Owner-Approval: PS3 fixes a typo in a comment. PS2 got ORV. Bug: 149353192 Test: SKIP_ABI_CHECKS=true EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true m out/soong/.intermediates/external/apache-xml/apache-xml/android_common_com.android.art.debug/hiddenapi/unaligned/unaligned.jar Change-Id: Ibaf383c439945ab664e885af319548b56e2c8cb6
* | Reland "Turn on the instrumentation by default for the java code in APEXes"Jiyong Park2020-02-241-0/+5
|/ | | | | | | | This reverts commit c021ea0b3543d4ff64b16414c0276b96dc5b2c4b. Bug: 149353192 Change-Id: I2b1c0736202de26c5ea88c0ab14574bd7207a5fb Test: N/A (this is a clean revert) forward fix will be followed
* Allow java_system_modules_import to replace java_system_modulesPaul Duffin2020-02-191-7/+5
| | | | | | | | | | | | | | Previously, there were some places where a java_system_module_import could not be used in place of a java_system_module. That was because the code assumed a *SystemModules type not a *systemModulesImport type. This change introduces a SystemModulesProvider interface that is used instead and is implemented on both types. Bug: 142940300 Test: m nothing ran new tests before changes to make sure they detected the issue and after to make sure the changes fixed the issue. Change-Id: I7b16ac5708880bdf61e6f5b1e6616c986f0ed763
* Merge "sdk_version: "system_server_current""Treehugger Robot2020-02-181-2/+13
|\
| * sdk_version: "system_server_current"Jiyong Park2020-02-121-2/+13
| | | | | | | | | | | | | | | | | | | | The new sdk version "system_server_current" is for system server components that needs to use all public APIs, system APIs, module APIs, and the system server APIs. Bug: 146757305 Test: m Change-Id: I24fd5af010532a110393676607dc90889f2ec17e
* | Merge "Revert "Turn on the instrumentation by default for the java code in ↵Jackal Guo2020-02-171-5/+0
|\ \ | | | | | | | | | APEXes""