aboutsummaryrefslogtreecommitdiffstats
path: root/java
Commit message (Collapse)AuthorAgeFilesLines
* Fix the unbundled mainline module buildJiyong Park2019-07-172-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes two problems: 1) the prebuilt apexes are force disabled for the unbundled builds because we need to build the modules from the source then 2) the dependencies from an sdk_library module to *.stubs.{public|system|tests} are not added for the unbundled build because the stubs modules are disabled. Bug: 137282010 Test: unbundled mainline builds are successful Test: build com.android.media and inspect the jar file to see if hiddenapi flags are there $ cd out/dist/mainline_modules_arm $ unzip com.android.media.apex apex_payload.img $ mkdir -p mnt $ sudo mount -o ro,loop apex_payload.img mnt $ dexdump2 mnt/javalib/updatable-media.jar | grep hiddenapi shows results Merged-In: I2c00af07aac4a15770d3acab011a36e2e4803bfc Change-Id: I2c00af07aac4a15770d3acab011a36e2e4803bfc (cherry picked from commit 53554e25593d6498a229d1dc89208aade4137008)
* Revert "Don't build hiddenapi flags or encode dex for unbundled builds"Jiyong Park2019-07-172-6/+4
| | | | | | | | | | | | This reverts commit 7b8a567f44b3fdb30eac8211e8ed8e27fb162797. Bug: 137282010 Test: With the CL above this one, the unbundled mainline module build does not fail. Merged-In: I2f49fa7dbe1da92cb282a9bc14acd5830888ed17 Change-Id: I2f49fa7dbe1da92cb282a9bc14acd5830888ed17 (cherry picked from commit 716828ab4ec2a673e6022171bb2b52584ee8e916)
* Uncompress dex in unbundled privileged appsColin Cross2019-06-252-5/+91
| | | | | | | | | | | | Mainline builds privileged apps unbundled and then uses them as prebuilts, so they need to respect the privileged flag when deciding whether or not to uncompress the dex. Bug: 135772877 Test: TestUncompressDex Change-Id: I91da7116b779ae35c0617ef77dbcb9788902370c Merged-In: I91da7116b779ae35c0617ef77dbcb9788902370c (cherry picked from commit 53a87f523b75f86008c3e0971489a06a6450a670)
* Optionally embed NOTICE files in apks.Jaewoong Jung2019-06-254-11/+177
| | | | | | | | | | | | | If embed_notices or ALWAYS_EMBED_NOTICES is set, collect NOTICE files from all dependencies of the android_app, merge them with the app's own one (if exists), transform it to HTML, gzip it, and put it as an asset in the final APK output. Bug: 135460391 Test: app_test.go + Built Mainline modules Change-Id: I52d92e2fd19b3f5f396100424665c5cc344190d8 Merged-In: I52d92e2fd19b3f5f396100424665c5cc344190d8 (cherry picked from commit 5b425e2e20c55216c1ed13fcf047b0df33886736)
* Don't build hiddenapi flags or encode dex for unbundled buildsColin Cross2019-05-292-4/+6
| | | | | | | | | | | Builds with TARGET_BUILD_APPS shouldn't build the hiddenapi flags or encode dex files even if frameworks/base exists. Bug: 133343287 Test: mainline modules build Change-Id: I0647451420fd09bb680808b35e1ad3b8f514ba46 Merged-In: I0647451420fd09bb680808b35e1ad3b8f514ba46 (cherry picked from commit 9c74a1ee855b1dcf4871a4cc40f317bd765ab7fd)
* Add No_dist propertySundong Ahn2019-05-161-45/+54
| | | | | | | | | | | For the sysprop apis, we don't need dist. So the No_dist property is added for it. Bug: 132448761 Test: m -j dist Merged-In: I51c6a6b87ab9dc90b6825c0d4d414e958dd7b265 Change-Id: I51c6a6b87ab9dc90b6825c0d4d414e958dd7b265 (cherry picked from commit 80a87b3309192d0f0caa2097a097ed4ed20c6fff)
* Pass other boot classpath locations to the apex image.Nicolas Geoffray2019-05-131-8/+16
| | | | | | | | | | | | | | 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. (cherry picked from commit feef2ef4d7cc146885c482899f9a967554dc083d) Change-Id: I44ea9d99985c3e9d21602f2c612364d0cef0d1ea Merged-In: Ib0d3acf8d2718ee443b3bffe8122a54f92257691
* Support target.hostdex.requiredColin Cross2019-04-262-0/+10
| | | | | | | | | | | Hostdex modules sometimes need extra required modules, add target.hostdex.required. Bug: 131167818 Test: manual Change-Id: I599f3499f0b738556baeb27185371a42b4c2701b Merged-In: I599f3499f0b738556baeb27185371a42b4c2701b (cherry picked from commit 7f87f4fdeb30f612d74001acb26c466cbb452467)
* Merge "Fix handling optimize.enabled from java_defaults" into qt-devColin Cross2019-04-244-5/+43
|\
| * Fix handling optimize.enabled from java_defaultsSasha Smundak2019-04-224-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some module types (`android_test`, etc.) set `optimize.enabled` by default. If such module happens to have `defaults` attribute which clears `optimize.enabled`, the latter value is ignored. Fixes: 129858282 Test: unit tests in java_test.go, `atest CtsExtendedMockingTestCases` succeeds with aog/936802 reverted (that is, with cts/test/mocking converted to Android.bp) Change-Id: Ib8e3a0ab0bd489d70ed07f626082aeae31c45e7c Merged-In: Ib8e3a0ab0bd489d70ed07f626082aeae31c45e7c (cherry picked from commit 2057f82161dec05cb23535da713ec0fae44c38d1)
* | Set default target SDK version for APEXJiyong Park2019-04-232-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target SDK version is used for targeting an APEX to a specific set of platform builds. Usually, the targeting is unrestricted (in case the APEX can run on all platforms), or based on platform SDK version (e.g. 28 for P). However, when the platform is under development and SDK is not finalized, the targeting should be much more fine-grained; the APEX should be targeted to a very specific build that supports the same set of APIs that the APEX was built against. To support that, target sdk version is automatically set by the build system. When the platform is released or SDK is finalized, the target sdk version set to the SDK version number. If not, it is set to <version_code>.<fingerprint> (e.g., Q.123456). Note that the target sdk version set by the build system is used only when the target sdk version is not explicitly set in AndroidManifest.xml. Bug: 130541924 Test: UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true \ UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true \ TARGET_BUILD_APPS=com.android.tzdata m build.ninja has --target_sdk_version Q.$$(cat out/soong/api_fingerprint.txt) Test: aapt dump badging out/dist/com.android.tzdata.apex | grep \ targetSdkVersion shows: targetSdkVersion:'Q.6ee443d9ad5f0cca7a43cfa97b7fc62a' Merged-In: I086230d787f01075c28fc3f0163550300fa00212 Change-Id: I086230d787f01075c28fc3f0163550300fa00212 (cherry picked from commit 71b519d6ce98fc0313019d84777bfc04f3799efc)
* Allow codename.fingerprint format for targetSdkVersionColin Cross2019-04-224-14/+84
| | | | | | | | | | | Use codename.fingerprint format for targetSdkVersion if it is unset in the manifest and UNBUNDLED_BUILD_TARGET_SDK_WITH_API_FINGERPRINT=true. Test: manual Bug: 130541924 Change-Id: I4e3b1274cc32038b00b292dc6d67559eb320e9e4 Merged-In: I4e3b1274cc32038b00b292dc6d67559eb320e9e4 (cherry picked from commit 109328714ff626446e16cfdd3103a5b969284841)
* Build framework.aidl in SoongColin Cross2019-04-228-235/+366
| | | | | | | | | | | | | | | Move the rules to build framework.aidl into Soong, and use it when compiling aidl files with sdk_version: "current". Also fixes incorrectly using the aidl includes exported by the "framework" module when the proguardRaiseDep dependency was added. Bug: 130798034 Test: sdk_test.go Change-Id: I126adf1d9e7b6acb528875ff62b974ba7ad9a337 Merged-In: I126adf1d9e7b6acb528875ff62b974ba7ad9a337 (cherry picked from commit 3047fa23da6d9f6e504c81e275ad7f6761fb7c7b)
* Get default sdk_test.go values from configColin Cross2019-04-221-7/+9
| | | | | | | | | | | This will help avoid merge conflicts between branches that have additional default libraries. Bug: 130798034 Test: sdk_test.go Change-Id: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d Merged-In: I98d5b8b2ea939df7ef57686f3bd913d6a21edc5d (cherry picked from commit 901ea31b7ce8b9c3aac5461cc8a8b3480cffe011)
* Make makevars deterministicColin Cross2019-04-161-0/+7
| | | | | | | | | | Sort map keys before iterating over them to produce makevars. Bug: 130411407 Test: m checkbuild Change-Id: I4153977705da05a5c73e641f93d02f408209c897 Merged-In: I4153977705da05a5c73e641f93d02f408209c897 (cherry picked from commit 91268c668ce952baee0d5ddb922b7b4c8ddd5b1d)
* Merge "Fix package path of android/soong/android pctx" into qt-devTreeHugger Robot2019-04-121-1/+1
|\
| * Fix package path of android/soong/android pctxColin Cross2019-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | android/soong/common was renamed to android/soong/android long ago, but the pctx package path was still "android/soong/common". This required all users of rules defined in android/soong/android to import "android/soong/android" and then pctx.Import("android/soong/common"). Bug: 130298888 Test: m checkbuild Change-Id: I20d096522760538f7cfc2bec3d4bfeba99b275d4
* | Include proper deps for signapkDan Willemsen2019-04-101-0/+3
|/ | | | | | | | Bug: 130111713 Test: run signapk remotely, action succeeds after this change Change-Id: I1670a27341591e0762cdfb42bcf424f065837192 Merged-In: I1670a27341591e0762cdfb42bcf424f065837192 (cherry picked from commit c4bd8f82826840e7921bc512b2557e0c39bad068)
* Merge "Check package restrictions for Java libs." into qt-devVladimir Marko2019-04-094-0/+47
|\
| * Check package restrictions for Java libs.Vladimir Marko2019-04-094-0/+47
| | | | | | | | | | | | | | | | | | | | | | Test: m checkbuild; inspect verbose log. Test: Manual - compile with unmet restrictions. Bug: 122937705 (cherry picked from commit 0975ee0de3d2befefa613754b4dd684a1a9b8c0e) Change-Id: Ibecfb53072f060e046d3c8fdca0911d66cc6922d Merged-In: I9360ae8b6d9ce016b7827be5e8ffc6eb521809b7
* | Use the full dexpreopt boot classpath when preopting with other images.Nicolas Geoffray2019-04-081-2/+6
|/ | | | | | | | | | Bug: 119800099 Test: m (cherry picked from commit 06758a7e13d2fe26bc8e2798bba21dd85e4cd2de) Change-Id: I60c154c3b3e2ab9b80ea9df0efa168ccd9efcc60 Merged-In: Ia9b34aa92ebb1b4de96ea0f8f290d798be19b2cf
* Use the apex image when the device config asks for it.Nicolas Geoffray2019-04-051-0/+3
| | | | | | | | | | Test: lunch walleye_jitzygote-userdebug m && all odex file use the apex image Bug: 119800099 (cherry picked from commit 25c0e03520f40a5aa0b0525715297fa1f09f8f03) Change-Id: I901ed57136885f87470d1ee398b92972151547f2 Merged-In: Id2fff6a4569d48b8e6a886cb82bdba205b0dd56a
* Merge "Fix sdk_version: "system_current" when Platform_sdk_final=true" am: ↵Colin Cross2019-04-034-19/+58
|\ | | | | | | | | | | | | | | b007b2bde5 am: 8c3f398c6c am: 209edee425 Change-Id: I54ea846c9ac2b29354109755225db71dcdaa1527
| * Merge "Fix sdk_version: "system_current" when Platform_sdk_final=true"Colin Cross2019-04-034-19/+58
| |\
| | * Fix sdk_version: "system_current" when Platform_sdk_final=trueColin Cross2019-04-024-19/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When PLATFORM_VERSION_CODENAME is set to REL Platform_sdk_final becomes true, which causes the return value of sdkVersionToNumber for "system_current" to a real version number instead of FutureApiLevel. This enables the check against PlatformSystemSdkVersions, which doesn't contain "current". Use the numeric value instead. Fixes: 129786845 Test: sdk_test.go Change-Id: If7cf211cc01c5fbf3e3ece3c3f604718a13d5a9b
* | | Merge "Fix panic when missing hiddenapi jar" am: f5df780fc2 am: f5a8e0e88dColin Cross2019-04-031-1/+1
|\| | | | | | | | | | | | | | | | | am: c2c2824ff9 Change-Id: I358685842ca77c435a02b52bf2b278a841a51808
| * | Fix panic when missing hiddenapi jarColin Cross2019-04-021-1/+1
| |/ | | | | | | | | | | | | | | | | Fix a panic after reporting an error when a module is listed in ProductHiddenAPIStubs but doesn't exist or doesn't produce a dex jar. Test: manual Change-Id: I43643cbc5303536bfe0b02feedb03563ea0b540a
* | Add support for protoc plugins am: fe17f6f0e8 am: 91c063cfdcColin Cross2019-04-023-37/+36
|\| | | | | | | | | | | am: 7299e418df Change-Id: I30e57f6678343f57233831775b62afa1f043a450
| * Add support for protoc pluginsColin Cross2019-04-023-37/+36
| | | | | | | | | | | | | | | | | | Add a proto.plugin property to allow specifying a custom protoc plugin to generate the code. Fixes: 70706119 Test: m am StreamingProtoTest Change-Id: I1ecdd346284b42bbcc8297019d98d2cd564eb94c
* | Move proto compilation to RuleBuilder am: 19878da6a0 am: 61918685aaColin Cross2019-04-022-62/+30
|\| | | | | | | | | | | am: c8a3eb9110 Change-Id: If3922ee1900d6f3888c7291997ac49d4a939c065
| * Move proto compilation to RuleBuilderColin Cross2019-04-022-62/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Using blueprint.Rule for protoc commands was causing code duplication because there was no good way to run the same protoc for cc, java and python but then run custom source packaging steps for java and python. Move most of the code into a common function that returns a RuleBuilder, and then let java and python add their own commands at the end of the rule. Bug: 70706119 Test: All Soong tests Test: m checkbuild Change-Id: Ic692136775d273bcc4f4de99620ab4878667c83a
* | Merge changes I7dd4ba7f,I7887a67a am: 92cc71606c am: 900574f0cdColin Cross2019-04-021-1/+1
|\| | | | | | | | | | | am: 6c99a30bb7 Change-Id: If557897ed64ecdf8967299b5512392e5485767ae
| * Merge changes I7dd4ba7f,I7887a67aColin Cross2019-04-021-1/+1
| |\ | | | | | | | | | | | | | | | * changes: Add depfile support to RuleBuilder Add RuleBuilderCommand.Flags
| | * Add depfile support to RuleBuilderColin Cross2019-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow rules built with RuleBuilder to use depfiles. Ninja only supports a single depfile with single output. If there are multiple outputs in a rule, move all but the first to implicit outputs. If multiple depfiles are specified, use new support in dep_fixer to combine additional depfiles into the first depfile. Test: rule_builder_test.go Change-Id: I7dd4ba7fdf9feaf89b3dd2b7abb0e79006e06018
* | | Merge "Automatically greylist code in 3P packages" am: dca6ac3e35 am: 595282ced1Andrei-Valentin Onea2019-04-021-0/+2
|\| | | | | | | | | | | | | | | | | am: 364388b3a5 Change-Id: I90eb022de6f2d718e8b2637a4c05dd2859045c67
| * | Merge "Automatically greylist code in 3P packages"Andrei-Valentin Onea2019-04-021-0/+2
| |\ \ | | |/ | |/|
| | * Automatically greylist code in 3P packagesAndrei Onea2019-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | Bug: 129387816 Test: m appcompat Test: frameworks/base/tools/hiddenapi/generate_hiddenapi_lists_test.py Change-Id: Id55abed766a6de6a2c032ee12d5153ab73a8d65c
* | | Merge "Fix an override_module bug." am: 044ead6b1a am: 5ce95f2eafJaewoong Jung2019-03-271-2/+3
|\| | | | | | | | | | | | | | | | | am: ac24969630 Change-Id: I352a380486600c0b48a61daa0457eff09ceb8f66
| * | Fix an override_module bug.Jaewoong Jung2019-03-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proptools.PrependProperties doesn't replace a pointer when both the src and the dst have one. This prevented override_module from overriding simple value pointer properties when the base module has existing values. It turns out this was why the name property needed to be overwritten manually. Bug: 122957760 Test: app_test.go Change-Id: I3302287c31a560422548c22fade95261ddbe606a
* | | Merge "Always package JNI libs into android_test modules" am: eae12cf400 am: ↵Colin Cross2019-03-273-45/+98
|\| | | | | | | | | | | | | | | | | | | | | | | f394fb0a27 am: b1af785608 Change-Id: I73d8243ae1bd428098f4f60b4a22c9b50785c481
| * | Always package JNI libs into android_test modulesColin Cross2019-03-273-45/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | android_test modules should always have native libraries packaged into the APK even when use_embedded_native_libs: false is set. Fixes: 129298278 Test: TestJNIPackaging Change-Id: Idfcc630f7c6579c1280a920b5d71808b0a502e06
* | | Merge "Add package_name property to android_app." am: c7dd408f89 am: 2afb72b7a0Jaewoong Jung2019-03-272-4/+32
|\| | | | | | | | | | | | | | | | | am: fa1f34f99f Change-Id: I59d3f61a8624a2ad4f356d95c67c4d97cbd4c0a4
| * | Merge "Add package_name property to android_app."Jaewoong Jung2019-03-272-4/+32
| |\ \ | | |/ | |/|
| | * Add package_name property to android_app.Jaewoong Jung2019-03-262-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | This enables users to override the package name of their apps either directly in android_app or through override_android_app. Bug: 122957760 Test: app_test.go Change-Id: I98080a4076ce970fc85e58fc33495ba9b363eec9
* | | Merge "Add java_test_helper_library" am: d637872f44 am: e988582019Paul Duffin2019-03-262-21/+55
|\| | | | | | | | | | | | | | | | | am: 036526adad Change-Id: Ie734f0aec3b503d0cc767772bc7422c435f9fbe6
| * | Add java_test_helper_libraryPaul Duffin2019-03-252-21/+55
| |/ | | | | | | | | | | | | | | Extracts testSuiteComponent() function to reduce duplication. Bug: 128969758 Test: atest CtsJdwpTestCases Change-Id: I23746b18112d22f8670666f429a665b34b1955fd
* | Merge "Don't visit disabled modules with SOONG_COLLECT_JAVA_DEPS=true" am: ↵Colin Cross2019-03-231-0/+4
|\| | | | | | | | | | | | | | | 6d75c9d18e am: 4e976b56be am: d139b8037c Change-Id: I2007374b40673f07085a94d110cf65cfeda9570e
| * Merge "Don't visit disabled modules with SOONG_COLLECT_JAVA_DEPS=true"Treehugger Robot2019-03-231-0/+4
| |\
| | * Don't visit disabled modules with SOONG_COLLECT_JAVA_DEPS=trueColin Cross2019-03-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling AndroidMk() on a disabled module may not be safe because the module will not have had GenerateAndroidBuildActions() called on it to initialize the data structures that AndroidMk() expects to exist. Check module.Enabled() before generating IDE info. Fixes: 129089976 Test: SOONG_COLLECT_JAVA_DEPS=true m nothing Change-Id: Icd79088c532c1842801f2bf89d92bc1a67109936
* | | Merge "Rename jetifier property and add it to androidmk" am: 4ada982da9 am: ↵Colin Cross2019-03-222-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | 33938d3188 am: eb1cebad0d Change-Id: I6ae03146be0e84ac0391c5db2a944eb054b8a9e9