aboutsummaryrefslogtreecommitdiff
path: root/java
Commit message (Collapse)AuthorAgeFilesLines
* Getting rid of old hacky Libs conversionAlix2023-01-191-11/+4
| | | | | | | | | Now that libs conversion is happening for the needed module_types, removing if statement with old hacky libs conversion Test: Presubmit Bug: 244210934 Change-Id: I92bb2080eeb7dcb85d087a3ff6054bdf8675ec54
* Merge "bp2build support libs for *->android_library_import"Alix Espino2023-01-191-0/+15
|\
| * bp2build support libs for *->android_library_importAlix2023-01-171-0/+15
| | | | | | | | | | | | Test: bp2build tests Bug: 258688914 Change-Id: Ibeae04e4c006f84f902774821c92f463a7c709eb
* | Merge "Replace RuleBuilder usages with static rules in app_import.go"Cole Faust2023-01-172-42/+38
|\ \
| * | Replace RuleBuilder usages with static rules in app_import.goCole Faust2023-01-132-42/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RuleBuilder creates a new rule in the ninja file every time it's used, but in this case the rules were all exactly the same except that the input/output file paths were different. This can be converted to a single static rule instead. Bug: 262629589 Test: m nothing Change-Id: Iaa887c66a757da13293a3614c000d3be02a2a1b0
* | | support libs for java_plugin -> *Alix2023-01-171-3/+1
| |/ |/| | | | | | | | | Test: bp2build tests Bug: 244210934 Change-Id: I7dbc820b23c4129485b0991aefb41e00e434d94e
* | Merge "libs support for android_app->* edge"Alix Espino2023-01-171-1/+3
|\ \ | |/ |/|
| * libs support for android_app->* edgeAlix2023-01-121-1/+3
| | | | | | | | | | | | Test: bp2build tests Bug: 258688914 Change-Id: I2e24c484019c994b43509f350b3c090a40c3ba6a
* | Merge "Add java_api_library properties to java_defaults"Jihoon Kang2023-01-122-1/+90
|\ \
| * | Add java_api_library properties to java_defaultsJihoon Kang2023-01-102-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context - Some Java API surfaces have subset relationships (i.e. public API surface is a subset of system API surface). Thus, simply listing all API files that contributes to hierarchical API surfaces when defining java_api_library modules can lead to repetition of code in Android.bp files. - Utilizing java_defaults can resolve this problem by grouping java_api_contribution modules by API surfaces, and reduce code repetition and enhance readability. Implementation - Modify java_api_library module to utilize java_defaults modules. Test: m Change-Id: I6adead208ca36c21de72ee39c4f532b84af8a153
* | | Merge "Use centralized rules.bzl file for android rules in bp2build."Romain Jobredeaux2023-01-122-4/+4
|\ \ \ | |_|/ |/| |
| * | Use centralized rules.bzl file for android rules in bp2build.Romain Jobredeaux2023-01-112-4/+4
| | | | | | | | | | | | Change-Id: I6e4837d8b6715960337d0db9b36f8137efb5673e
* | | Merge "java_binary with kotlin sources"Alix Espino2023-01-121-16/+54
|\ \ \
| * | | java_binary with kotlin sourcesAlix2023-01-091-16/+54
| | | | | | | | | | | | | | | | | | | | Test: bp2build conversion tests and inspected build file for AnalyzerKt Change-Id: I0f6d5c3d371a9dbd000b74144ad68d5d8bd156cf
* | | | Merge "Update app tests to set Unbundled_build"Treehugger Robot2023-01-121-0/+3
|\ \ \ \
| * | | | Update app tests to set Unbundled_buildHarshit Mahajan2023-01-111-0/+3
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the description for UnbundledBuildApps(), UnbundledBuild() should always be true when UnbundledBuildApps() is true. Updating the test to match this condition. More details: https://android-review.git.corp.google.com/c/platform/build/soong/+/2380693/comment/54f172b4_2eee54fa/ Bug: b/227460469 Test: m nothing Change-Id: I3a93edb781522da5af201f6864e157e7bab2195a
* | | | Merge "Fix ALLOW_MISSING_DEPENDENCIES builds for prebuilt JNI libraries"Treehugger Robot2023-01-111-0/+2
|\ \ \ \ | |/ / / |/| | |
| * | | Fix ALLOW_MISSING_DEPENDENCIES builds for prebuilt JNI librariesColin Cross2022-12-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for ALLOW_MISSING_DEPENDENCIES before reporting an error with a prebuilt JNI library missing the required architecture. Bug: 263138197 Test: lunch aosp_riscv64-userdebug && m Change-Id: Ifa02c3c690cca1bf7b2b62cf9888f80d96073d71
* | | | Consider only preferred modules for jdepsInseob Kim2023-01-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 263327259 Test: run atest and see modules to be built Change-Id: I208a07e2453b924f8af25db340d970ec039c5f32
* | | | Merge "Create a "Toolchain" API surface"Spandan Das2023-01-111-0/+1
|\ \ \ \
| * | | | Create a "Toolchain" API surfaceSpandan Das2022-12-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This creates a new API surface for the APIs provided by ART to compile other API domains (e.g. this contains LambdaMetaFactory). The scope of this API surface is restricted to compile-time. Unlike the other API surfaces (e.g. public) whose APIs will exist on device in the form of implementation libraries, these classes are not guaranteed to exist on device. This also updates the naming convention map used in Multi-tree API export Bug: 261244752 Test: TH Change-Id: I164714d68618a3c289bac1a695958e36fdbbda5d
* | | | | Move target sdk version enforcement checkHarshit Mahajan2023-01-092-5/+76
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enforce target sdk version flag could only be used by `android_app`, moving the check into a common function `generateAndroidBuildActions`. This would ensure that the `enforce_target_sdk_version` flag can also be set by `android_test` and `android_test_helper_app`. Bug: b/227460469 Test: m nothing Change-Id: I86e0bf684a5083221dae53907d9f548a0390b673
* | | | Merge "Move art's java_system_modules into a shared inner tree"Spandan Das2023-01-091-0/+73
|\ \ \ \
| * | | | Move art's java_system_modules into a shared inner treeSpandan Das2022-12-081-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These will be built using the toolchains of the respective inner tree. This will eventually allow us to drop them from the module SDK (albeit we still need to make them work for S/T builds) Test: TH Bug: 261476442 Change-Id: I43726a2a171d25ace90dc3ddc73e228ffadfb37c
* | | | | Merge "Configure ObsoleteLintCustomCheck lint as fatal"Matt Gilbride2023-01-091-0/+5
|\ \ \ \ \ | |_|_|_|/ |/| | | |
| * | | | Configure ObsoleteLintCustomCheck lint as fatalmattgilbride2023-01-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lint raises an issue ObsoleteLintCustomCheck if it detects incompatibilities between a custom lint check jar and the lint api itself. This is a warning by default, but in AOSP it should be fatal. Any custom checks are expected to run. If they don't, there is risk of introducing bugs. ObsoleteLintCustomCheck will now cause build breakage so that it will be investigated immediately. Bug: N/A Test: TH Change-Id: I3a46c93d5b53ee0e1add7c287af791bd1b41f1c1
* | | | | Merge changes I07db8afc,Ia89e0239Treehugger Robot2023-01-078-30/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Stop module types being SdkAware Replace usages of SdkAware in sdk module with Module
| * | | | | Stop module types being SdkAwarePaul Duffin2022-12-128-30/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes all usages of SdkBase and InitSdkAwareModule. Bug: 260237150 Test: m nothing Change-Id: I07db8afc805eadbeb5b23f2e1d2f51567eecfab0
* | | | | | Merge "Remove SdkAware.SdkMemberComponentName"Treehugger Robot2023-01-071-6/+2
|\| | | | |
| * | | | | Remove SdkAware.SdkMemberComponentNamePaul Duffin2022-12-121-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That method was provided to allow a java_sdk_library_import that was part of a versioned sdk snapshot to create the name of its component modules consistent with the way in which modules were named within the sdk snapshot. As versioned sdk snapshots have all been removed this is no longer necessary. Bug: 260237150 Test: m nothing Change-Id: Iee35abd6d210d9a33dfd8ef2f9c77a53329fda24
* | | | | | Merge "Remove IsModuleInVersionedSdk"Paul Duffin2023-01-065-106/+41
|\| | | | |
| * | | | | Remove IsModuleInVersionedSdkPaul Duffin2022-12-125-106/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, as all versioned sdk snapshots have been removed from Android.bp files this method would always return false. This change effectively replaces all calls to it with false, and then optimizes away any unused code. Bug: 260237150 Test: m nothing Change-Id: I1b717ee8345e807bd888451f6e7e3c3a0d391ee2
* | | | | | Merge "Dedup checks for module being in versioned sdk snapshot"Paul Duffin2023-01-061-1/+1
|\| | | | |
| * | | | | Dedup checks for module being in versioned sdk snapshotPaul Duffin2022-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, various places duplicated the logic to check whether a module was part of a versioned snapshot. This change replaces that code with a call to the existing IsModuleInVersionedSdk(Module) func. This makes the code consistent in preparation for a change that will remove all calls to IsModuleInVersionedSdk(Module). It is separated out from that change as it is easier to see that the replaced code is equivalent to the IsModuleInVersionedSdk(Module) func when it is not mixed in with other changes. It also makes the following change easier to review. Bug: 260237150 Test: m nothing Change-Id: I44d665bf02d2fc97632a03b5a3d2225ea3c2827d
* | | | | | Merge "support libs for android_library"Treehugger Robot2023-01-062-6/+21
|\ \ \ \ \ \
| * | | | | | support libs for android_libraryAlix2023-01-052-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adds support for *-> android_library and android_library->* edges Change-Id: I41d4e1d1b8106a17e67951d47e67b59ef3170d17 Test: manually inspected build files for libWallpaperPicker & android-suppor-v4
* | | | | | | Merge "Revert "R8/D8 should use sdk_version prop to determine API surface ↵Spandan Das2023-01-054-38/+15
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | stability.""
| * | | | | | | Revert "R8/D8 should use sdk_version prop to determine API surface stability."Spandan Das2023-01-044-38/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit daa220ae8ce36c3c155bb35b205a5826c779202c. Reason for revert: Suspected to be a cause for build failure (b/264446640). Will use go/abtd to verify Change-Id: Ibfdf893f2426b1119923467027e0acedd08808c1
* | | | | | | | Merge "Libs support for * -> java_library_edge with kt sources"Alix Espino2023-01-041-10/+8
|\ \ \ \ \ \ \ \
| * | | | | | | | Libs support for * -> java_library_edge with kt sourcesAlix2022-12-151-10/+8
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 244210934 Test: bo2build tests and built kotlinx_atomicfu Change-Id: Id6eac2f104878e4d7902a32e846ef1cc87dd7863
* | | | | | | | Merge "Allow adding extra tradefed options in the Android.bp file"Cole Faust2023-01-043-8/+55
|\ \ \ \ \ \ \ \
| * | | | | | | | Allow adding extra tradefed options in the Android.bp fileCole Faust2023-01-033-8/+55
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests need to add custom tradefed options, but still want to keep most of the soong autogenerated tradefed xml file. Expose a test_options: { tradefed_options: [...] } property that will allow tests to add more options to the autogenerated xml file. Fixes: 184895128 Test: go test, and verified that the ninja files did not change for aosp_arm64 Change-Id: I50d4ad139322e9e207202f1e1a50f5bbb424aa6f
* | | | | | | | Merge "R8/D8 should use sdk_version prop to determine API surface stability."Treehugger Robot2023-01-044-15/+38
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | / / / / / | | |/ / / / / | |/| | | | |
| * | | | | | R8/D8 should use sdk_version prop to determine API surface stability.Spandan Das2023-01-044-15/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `min_sdk_version` is used to represent the api_level of the device and its type will eventually become android.ApiLevel. OTOH, `sdk_version` property represents the API surface a module builds against _and_ the version of that API surface. For R8/D8, the additional `--android-platform-build` should be determined using the sdk_version of the soong module and not min_sdk_version, since min_sdk_version will not contain information about the api surface used for compilation. The unit test for `core_platform_app` in TestR8 were passing since min_sdk_version was not set, and therefore it implicitly defaulted to sdk_version. Also created a custom struct to propagate params to the helper dex functions Test: In build/soong, go test ./java Test: TH Bug: 208456999 Change-Id: I08ac6f496444d603557e498c8a1794af665abc7a
* | | | | | | Merge "Create (API) bp2build converters for droidstubs"Spandan Das2022-12-292-0/+112
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | |
| * | | | | | Create (API) bp2build converters for droidstubsSpandan Das2022-12-282-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The converter runs for api_bp2build, not bp2build workspace - Since droidstubs is an internal module created by java_sdk_library, the conversion encompasses the latter as well - Since droidstubs do not have an api_surface attribute, this conversion uses naming convention to infer the api_surface represented by the api file e.g. *stubs.source -> publicapi, *stubs.source.system -> systemapi) - Also adds an SdkIntraCore enum to represent the API surface provided by one core module to another There is also ongoing work to check in java_api_contribution modules in Soong. Once we have that, we can update this converter to operate on that module type instead Test: go test ./bp2build Change-Id: Ia85828e04c738d9ffcc524856d7c3034ee29bbf9
* | | | | | | Merge "Don't add dexpreopt compat deps to android_library modules"Treehugger Robot2022-12-292-5/+5
|\ \ \ \ \ \ \
| * | | | | | | Don't add dexpreopt compat deps to android_library modulesColin Cross2022-12-212-5/+5
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android_library modules are only dexpreopted when built into an app, and the app will already get the dexpreopt compat dependencies itself. Adding the compat dependencies to android_library modules causes circular dependencies when the android_library is used to build part of the framework, which is then used to build the compat libraries, which is added as a dependency to the andorid_library. Test: TestUsesLibraries Change-Id: I3aca780858c7e5f19d270bcbbe18e6cff8616b43
* / | | | | | Set Java version for java_api_library moduleJihoon Kang2022-12-272-1/+7
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, stubs are compiled with Java version 1.8. To align with this, set the java version passed to javac invocation as 1.8 for java_api_library module. Helper function is used to sync the java version of droiddoc module and java_api_library module. Test: m Change-Id: I103b94aed9747a2f2dd65d13de0ae9c0f33db5c0
* | | | | | Merge "Revert "Allow adding extra tradefed options in the Android.bp file""Jigar Thakkar2022-12-203-53/+7
|\ \ \ \ \ \