aboutsummaryrefslogtreecommitdiff
path: root/java/java.go
Commit message (Collapse)AuthorAgeFilesLines
...
* Stop generating unnecessary hidden API rulesPaul Duffin2021-05-141-4/+6
| | | | | | | | | | | | The rules to extract hidden API information from an individual module in order to create module specific files are no longer necessary as the monolithic files are created directly from the module's class jars and not the module specific files. Bug: 179354495 Test: verified that the monolithic out/soong/hiddenapi/... files are unchanged by this change Change-Id: I573ac17f3ea5da5a2a7e4f08718160dacca71c0c
* Strict updatability linting against dependencies.Jaewoong Jung2021-05-101-0/+14
| | | | | | | | | Propagate strict_updatability_linting to transitive dependencies using a top-down mutator. Test: lint_test.go Bug: 182349282 Change-Id: Ifc9e58f1a597e3c7725ee49b4027afb6f42f45cb
* Merge "Add missing calls to InitSdkAwareModule"Paul Duffin2021-05-071-0/+2
|\
| * Add missing calls to InitSdkAwareModulePaul Duffin2021-05-061-0/+2
| | | | | | | | | | | | | | | | | | A follow up change will add methods to SdkBase which requires its module field to have been initialized. Bug: 181569894 Test: m nothing Change-Id: I9b02f260ad3f82316cc7ab3b5717b7e81090b0d8
* | Transitively add APEX variants for contents of prebuilt_apex/apex_setPaul Duffin2021-05-061-1/+2
|/ | | | | | | | | | This is part of the work needed to allow the exported_java_libs property to be replaced by exported_bootclasspath_fragments. Bug: 187266082 Test: m nothing m SOONG_CONFIG_art_module_source_build=false nothing Change-Id: I2c1d70a390200b93163f9799719290c9d55a041c
* Extract java SdkMemberType instances as varsPaul Duffin2021-04-261-29/+34
| | | | | | | | This will allow them to be used from elsewhere in a follow up change. Bug: 177892522 Test: m nothing Change-Id: I60e94e148af5b1810aea7f724cba090b49ae758e
* Reland: Add jni_libs property to java testsColin Cross2021-04-191-0/+34
| | | | | | | | | | | | Add jni_libs property to java tests and treat it as test data that should be copied to the lib or lib64 directory in the test directory. This relands I3a118b933ab30dcd731c6dc2708da9bc63ab5520 with fixes for the test on mac. Fixes: 176593487 Test: java_test.go Change-Id: I2f8c46643cff7a7ae6dc4d4dbad58f0396e45f09
* Merge "Revert "Add jni_libs property to java tests""Colin Cross2021-04-171-34/+0
|\
| * Revert "Add jni_libs property to java tests"Colin Cross2021-04-171-34/+0
| | | | | | | | | | | | | | | | | | This reverts commit 246164a055a529e081a7690cc9043b496757a30c. Reason for revert: broke the mac build Bug: 176593487 Change-Id: Id0242e37aa40d84d291bf7b8ee46dfe98c4d5905
* | Merge changes from topic "tvts-test-host-jni"Treehugger Robot2021-04-171-0/+34
|\| | | | | | | | | | | * changes: Add jni_libs property to java tests Add Target to cc.SharedLibraryInfo
| * Add jni_libs property to java testsColin Cross2021-04-161-0/+34
| | | | | | | | | | | | | | | | | | Add jni_libs property to java tests and treat it as test data that should be copied to the lib or lib64 directory in the test directory. Fixes: 176593487 Test: java_test.go Change-Id: I3a118b933ab30dcd731c6dc2708da9bc63ab5520
* | SdkSpec is fully using ApiLevelJiyong Park2021-04-081-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, SdkSpec was constructed only from the user string. It didn't make use of the Config struct where information about the latest stable SDK version, etc. is recorded. As a result, the build system couldn't check if the sdk version "current" is referring to the in-development (i.e. not-yet-frozen) SDK version or the latest stable version. "current" was always assumed to be in-development (IsPreview() returns true) even when Platform_sdk_final == true. As the first step for fixing that, this change requires android.EarlyModuleContext to be passed when constructing SdkSpec from the user string. In the following changes, "current" will be mapped to either FutureApiLevel (10000) or one of the FinalApiLevels() depending on whether the platform SDK was finalized or not. Bug: 175678607 Test: m Change-Id: Ifea12ebf147ecccf12e7266dd382819806571543
* | SdkSpec = Scope + ApiLevelJiyong Park2021-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | SdkSpec.Version was an int type. Now it becomes ApiLevel type which is a better abstraction of the version (or api level). Bug: 1655587 Test: m Change-Id: I4d67b9b9eae45f653b6af4f5b73da9e091b3dfab
* | Move java.sdkSpec to the android packageJiyong Park2021-04-031-22/+22
| | | | | | | | | | | | | | | | | | ... in preparation for making the handling of sdk versions consistent across java and cc modules. Bug: 175678607 Test: m Change-Id: I598f0454bce9b7320621022115412fbe97403945
* | Merge "Revert "Revert "Add min_sdk_version to java_import."""Jaewoong Jung2021-04-021-1/+23
|\ \
| * | Revert "Revert "Add min_sdk_version to java_import.""Jaewoong Jung2021-04-021-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5ab650800820efec13d2e36d0ae25a4e4240ac00. Reason for revert: Resubmitting Ie255f74d40432f4bdd0092d618705a7d17235e58 after fixing the broken targets. Bug: 183695497 Test: https://android-build.googleplex.com/builds/forrest/run/L58600000849810513 Change-Id: I5f072f396002ca3a45bd530ad9be987efa732833
* | | Merge "Remove tradefed static_lib heuristic"Julien Desprez2021-04-021-1/+1
|\ \ \
| * | | Remove tradefed static_lib heuristicJulien Desprez2021-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Test: presubmit Bug: 180736967 Change-Id: I98b675dec086122e821caae9a9add8758d252724
* | | | Merge "Revert "Add min_sdk_version to java_import.""Jaewoong Jung2021-04-021-23/+1
|\ \ \ \
| * | | | Revert "Add min_sdk_version to java_import."Jaewoong Jung2021-04-021-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6d15d635569d420035e924c12a08091f0e9c579d. Reason for revert: Broke git_sc-mainline-prod on test_suites_x86_64 Fixes: 184305592 Change-Id: I4b2e2675e0dd9e2e84966f545a52f45d5b731bab
* | | | | Merge "Add min_sdk_version to java_import."Jaewoong Jung2021-04-011-1/+23
|\| | | | | |_|/ / |/| | |
| * | | Add min_sdk_version to java_import.Jaewoong Jung2021-03-311-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: 183695497 Test: apex_test.go Change-Id: Ie255f74d40432f4bdd0092d618705a7d17235e58
* | | | Remove unused java testing methodsPaul Duffin2021-03-311-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Also, stops exporting methods that are no longer used outside the java package. Bug: 181070625 Test: m nothing Change-Id: I23d35bbc21f82f2dae802aa53badda4c58b41024
* | | Take Module implementations out of java/java.go.Jaewoong Jung2021-03-191-1762/+1
| | | | | | | | | | | | | | | Test: TreeHugger Change-Id: I5c39915ad2cadf5981c201a2b412916524d4c3e2
* | | Merge "Export a few utility methods"Yuexi Ma2021-03-171-1/+15
|\ \ \
| * | | Export a few utility methodsYuexi Ma2021-03-161-1/+15
| | |/ | |/| | | | | | | | | | | | | | | | Add a few utility methods to support generating TradeFed test plan in C-Suite Test: go test . Change-Id: I86a505068b5d5aa0f5a37b3e3a2465839a7480ef
* | | Improve java.go readability.Jaewoong Jung2021-03-151-100/+115
| |/ |/| | | | | | | Test: TreeHugger Change-Id: I98bb7bddb740451ff2ccd28dcdaddff27e35a8cd
* | Merge "Treat core_platform as stable unless module uses legacy"Nicolas Geoffray2021-03-151-1/+10
|\ \
| * | Treat core_platform as stable unless module uses legacyPaul Duffin2021-03-101-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sdk_version: "core_platform" refers to the stable core platform unless the module is in the exception list. This change makes sure that CheckStableSdkVersion() reflects that behavior. Bug: 180399951 Test: m nothing Change-Id: Ia0b1e13322352b87f5a3c6621e37f23ba637ffb6
* | | Merge "Delete defaultsFactory in java.go."Jaewoong Jung2021-03-121-4/+0
|\ \ \
| * | | Delete defaultsFactory in java.go.Jaewoong Jung2021-03-101-4/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | The factory function became obsolete a long time ago. The module description text will be correctly extracted with this change. Test: TreeHugger Change-Id: If4eb936d34e5a71e6f298f53827a887f34af7cae
* / / Remove the robolectric heuristic out of java_testJulien Desprez2021-03-121-1/+1
|/ / | | | | | | | | | | Test: presubmit Bug: 180736967 Change-Id: I65193d1639088149d8c2f1d5b7d4311e9f69a609
* | Merge "Revert "Revert "Attempt to run all java_test_host that look unit...""Julien Desprez2021-03-061-0/+6
|\ \
| * | Revert "Revert "Attempt to run all java_test_host that look unit..."Julien Desprez2021-03-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert reland the change after tests have been fixed Reason for revert: relanding after fixes Reverted Changes: I89fbce4d7:Revert "Exclude some tests for java_test_host onbo... Iaa89f9b7e:Revert "Attempt to run all java_test_host that loo... Change-Id: Idaa80b2d5a8d3ba026e33b453bd163a4e2d31118
* | | Clear remains of java.Dependency interface.Jaewoong Jung2021-03-051-41/+0
| | | | | | | | | | | | | | | Test: TreeHugger Change-Id: If9dab2022a308b776d7ad760a61f0db97509b9b2
* | | Merge "Revert "Attempt to run all java_test_host that look unit tests""Julien Desprez2021-03-041-6/+0
|\| |
| * | Revert "Attempt to run all java_test_host that look unit tests"Julien Desprez2021-03-041-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert submission 1597083-java_test_host_default Reason for revert: Getting ready for b/181888225 just in case Reverted Changes: I220551549:Attempt to run all java_test_host that look unit t... I29dbbbf46:Exclude some tests for java_test_host onboarding Change-Id: Iaa89f9b7e9ad72ed962cef285c70a6263e63ffd5
* | | Merge "Attempt to run all java_test_host that look unit tests"Julien Desprez2021-03-041-0/+6
|\| |
| * | Attempt to run all java_test_host that look unit testsJulien Desprez2021-02-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently includes some heuristic for the first round of onboarding. Test: presubmit Bug: 180736967 Change-Id: I220551549ed3c1468390655cb911f3b8c0f8880d
* | | Remove global state from sysprop librariesColin Cross2021-02-261-53/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sysprop libraries use a global list to rewrite dependencies from implementation libraries to public stub libraries when appropriate. Remove the global list, and instead add a dependency from the implementation to the public stub that forwards the JavaInfo. Bug: 181367697 Test: sysprop_test.go Change-Id: Ia7995feb3c079ca9bb6a403daaae3e3329fd7f6a
* | | Propagate java resources in apps with no codeColin Cross2021-02-261-41/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the java resources jar as the dex jar when building apps that have no code. Also remove maybeStrippedDexJar, the dex jar is never stripped now. Fixes: 176305357 Test: TestAppJavaResources Change-Id: Ic8b1165bd35d71237d307e7f5f895764e203a10d
* | | Fix infinite recursion when printing unrecognized linktypeJiyong Park2021-02-231-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | Bug: N/A Test: remove some cases from String() so that some linktypes go to the default path. Then run m nothing. No infinite recursion. Error is correctly shown. PANIC=String method: unrecognized linktype: 5 Change-Id: I424755bc89871fc2144ff22d6391f57157cd434d Change-Id: Ice791025dc50f44ffabd1050bafc5ea35023d32c
* | Further simplify the link type check routineJiyong Park2021-02-181-28/+8
| | | | | | | | | | | | Bug: 180477804 Test: m nothing Change-Id: I216be96cf844fe42ba0cec467eea8520ff4ef4f2
* | Linktype check error message becomes more correctJiyong Park2021-02-181-18/+33
| | | | | | | | | | | | | | | | | | The type linkType has String() method and the error message is created using it. Bug: 180477804 Test: m nothing Change-Id: I74fe9c93b74904177dbe9d29cd3aa3304b67ba4f
* | Merge changes from topic "mkboot"Treehugger Robot2021-02-161-1/+1
|\ \ | | | | | | | | | | | | | | | * changes: prebuilt_etc is OutputFileProducer Revert "`data` dependency of java_test_host can be arch-specific"
| * | Revert "`data` dependency of java_test_host can be arch-specific"Jiyong Park2021-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cdd9b8392d669731fef6e1415496b181ae80ede9. Reason: this doesn't work. java_test_host is a multi target module. Therefore, `arch.<arhc>.data` is not collapsed to `data` by the arch mutator. Bug: N/A Test: N/A Change-Id: I755b06718bacfe1513f6ad1e734e5a0d0ac57cd8
* | | Allow explicitly specified additional annotations for hiddenapiPaul Duffin2021-02-161-0/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the hiddenapi_additional_annotations to allow a library to list the libraries that provided additional hiddenapi related annotations for a library. Modifies merge_csv.py so it can process multiple zip files at the same time and uses that to merge the embedded .uau files from a module and those it depends upon. Bug: 180102243 Test: m droid Verified that hiddenapi files (both aggregated ones and for the individual modules) are not affected by this change. Change-Id: I796520021c7357398a9e2a09f1029e4a578b05b3
* | Merge "Convert java.Dependency to JavaInfo provider"Colin Cross2021-02-131-51/+100
|\ \
| * | Convert java.Dependency to JavaInfo providerColin Cross2021-02-091-51/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | Export information about java dependencies through a Provider instead of accessing the module directly. Test: java_test.go Test: no changes to build.ninja Change-Id: Ifc5d566bf6f6ebc0ad399e948effaa1ef6a22876
* | | Move logic for selecting the primary module into initHiddenAPI()Paul Duffin2021-02-111-12/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | Bug: 178361284 Test: m droid Verified that hiddenapi files (both aggregated ones and for the individual modules) are not affected by this change. Also verified that the hiddenapi files created when using the prebuilts (using SOONG_CONFIG_art_module_source_build=false) are the same as when using the source. There is a slight difference in the order but otherwise identical. Change-Id: I831da5fa41eb7668b07bbdc4dd08ec2cdb8803d0