aboutsummaryrefslogtreecommitdiff
path: root/java/java.go
Commit message (Collapse)AuthorAgeFilesLines
...
* | Add commonSdkLibraryAndImportModule interfacePaul Duffin2021-06-231-2/+2
|/ | | | | | | | | The commonSdkLibraryAndImportModule defines the methods that a module which embeds the commonToSdkLibraryAndImport struct need to provide. Bug: 179354495 Test: m nothing Change-Id: I7a469ae03ea5c19922200284da08a9ae38a46751
* Simplify deapexer supportPaul Duffin2021-06-171-7/+12
| | | | | | | | | | Uses the apex relative path to the file as the identifier that is used to obtain the path to the corresponding file extracted from the apex. That is instead of a special constructed string id. Bug: 177892522 Test: m nothing Change-Id: I5dc77c8fb272bac289b8891d1eac801e541af1f5
* Remove javalib special case in createDeapexerModuleIfNeededPaul Duffin2021-06-171-0/+18
| | | | | | | | | | Removes the special case in createDeapexerModuleIfNeeded for handling java libraries and just get the Import and SdkLibraryImport module types to implement RequiredFilesFromPrebuiltApex instead. Bug: 177892522 Test: m nothing Change-Id: I5cc341b5b4168b8eb196f72273a00d498de6856f
* Don't fail if the target module is disabled in dex2oat toolMartin Stjernholm2021-05-181-0/+4
| | | | | | | | | | | | | | | | | | | dependencies. dexpreopt.RegisterToolDeps runs late after prebuilt dependencies have been resolved, and there's special code in dex2oatPathFromDep to resolve the prebuilt from the source module. However, if the source module is disabled then the dependencies check in validateAndroidModule will complain, so we need to disable that check in this particular situation. Also add a comment to explain why dexpreopt.RegisterToolDeps needs to run so late. Test: m nothing Bug: 145934348 Bug: 172480615 Change-Id: Ibc673303d0336768fa23261a2068e91a08f46a30
* Make uncompressDex available for use through hiddenAPIModulePaul Duffin2021-05-171-3/+3
| | | | | | | | | | | | In order for the bootclasspath_fragment to perform dex encoding on its contents it needs to know whether the dex file is uncompressed or not. This change makes that information available by passing it to initHiddenAPI, storing it in hiddenAPI struct and providing access through the hiddenAPIModule. Bug: 179354495 Test: m droid Change-Id: I913416b4836766de194203fd8ed5124b61dfa3dd
* Merge initHiddenAPI and hiddenAPIUpdatePathsPaul Duffin2021-05-171-9/+5
| | | | | | | | | These two methods did very similar jobs and merging them together simplifies the behavior. Bug: 179354495 Test: m droid Change-Id: Ibe1a23d54105e6a0e5693079cd8743679301fc85
* Remove configurationName from java library and hidden APIPaul Duffin2021-05-171-5/+3
| | | | | | | | | | | | | | | | | | | | | The configurationName was intended to separate the name of the module from the name used in configuration (such as BootJars) so that the child implementation library of a java_sdk_library on the bootclasspath would have hidden API encoding performed on it just as for the main java_library embedded within the java_sdk_library. While that did use to work it no longer does as the test added in the preceding change proves. It is not surprising that this regression does not appear to have caused any issues as the the child implementation library is only a build time artifact and not used at runtime. In future the only modules that will require hidden API encoding are those that are part of a bootclasspath module so there is no point in maintaining this capability. Bug: 179354495 Test: m droid Change-Id: Ief8136fa9e98600cdd8d36108ec22edc2ebd7c69
* 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