summaryrefslogtreecommitdiff
path: root/java/java.go
AgeCommit message (Collapse)Author
2022-06-08add multilib data_device_bins properties Sam Delmerico
Some targets need to be able to specify the specific architecture for a data_device_bin module. This commit adds new properties to allow specification of first, both, 32, or 64 multilib properties. Bug: 231448797 Bug: 232408185 Test: go test ./java -run TestDataDeviceBinsBuildsDeviceBinary Change-Id: I457cf4b1a9ccb28b46042f874c96bd0a87009fab Merged-In: I457cf4b1a9ccb28b46042f874c96bd0a87009fab
2022-04-08convert logtags in java srcs Sam Delmerico
Some java_* modules contain .logtag files in their srcs, but we should separate these out into their own targets. Test: enabled QuickSearchBox and build Change-Id: I595722ca59686d450ff522987a15ce283d3607e0
2022-04-05Merge "support errorprone javacflags" Treehugger Robot
2022-03-31convert java_import jars with arch variants Sam Delmerico
Bug: 220168131 Test: go test ./bp2build -run TestJavaImport Test: b build '...' Change-Id: Ib485e6905e7be9d199af5295b23131c226fd6e96
2022-03-31support errorprone javacflags Sam Delmerico
Soong has a separate property specifically for errorprone javacflags that we need to add to the Bazel javacopts. Test: go test ./bp2build Change-Id: I5299f45793d2b05a6a71b94dd17ceb797f407846
2022-03-30add plugins to javaLibraryAttributes Sam Delmerico
Test: go test ./bp2build Change-Id: I8e4c3f373c62c60ea5013cd8c585915a366c1f81
2022-03-30convert java_import_host with bp2build; enable jetifier Sam Delmerico
Also, add java_imports that were blocked by jetifier binary. b/221082840 was blocking the build of jetifier which these java_imports depended on. That bug is now resolved, so we can unblock these targets. Bug: 220168131 Test: b build //packages/apps/Car/libs/car-ui-lib/car-ui-androidx/... Test: build/bazel/ci/bp2build.sh Change-Id: I89a32bde30c133a44aeb7826afa11d4140433f5d
2022-03-30emulate java_library static_deps with Bazel exports Sam Delmerico
In Soong, java_library can specify static_deps which are dependencies that get aggregated into the final jar (akin to static linking). This is useful because it allows dependencies higher up in the chain to compile against the APIs exported by transitive dependencies. Bazel does not support this functionality directly, but it can be emulated via the exports attribute which makes any targets listed in the attribute public to targets further up the chain. Bug: 217236083 Bug: 219908977 Test: b build //external/error_prone:error_prone_core Test: b build //external/bouncycastle:bouncycastle-host Test: b build --platforms=//build/bazel/platforms:linux_x86 //prebuilts/sdk/tools/jetifier/jetifier-standalone:jetifier Change-Id: I2867e3f816de720a6f4bd9ff7a847d1b0c2da2d6
2022-03-18Don't pass static libs to r8 Colin Cross
r8 gets the static libs in the program jar, it shouldn't also get them as library jars. Keep a separate classpath for dexing that includes libs but not static_libs. Bug: 222468116 Test: m checkbuild Test: TestD8 Test: TestR8 Change-Id: Icca3393f496cbcadcc633f3b156761e6c145f975
2022-03-07bp2build supports arch variant srcs for java_library Sam Delmerico
Bug: 209577426 Test: build/bazel/ci/bp2build.sh Change-Id: I6799bda904d286616e580f2395601ce4f764180f
2022-03-07bp2build java_libraries depend on Android SDK Sam Delmerico
Soong adds an implicit dependency on the Android SDK for all java_libraries (and related modules). This feature becomes apparent after converting arch-variant srcs for android_apps, so we should suport this for now. Eventually, we will want to replace this forced dependency with a Bazel toolchain workaround. Test: build/bazel/ci/bp2build.sh Change-Id: Ic28e8c7690f69294b4bdcb9bb78a6f1f031fe97e
2022-02-15convert java proto libraries with bp2build Sam Delmerico
Allow java_libraries that depend on protobufs to be converted with bp2build. Bug: 215230097 Test: build/bazel/ci/bp2build.sh Change-Id: I3ce52389e7e4e82755605ee277c1e527a6aebc6b
2022-02-02Use common java library attributes for android_app bp2build converter. Romain Jobredeaux
Change-Id: I4dc7600fbe80eddc54a7fadd6418d6911af0b7f2 Test: go test ./bp2build
2022-02-02Merge changes I09902215,I4f86780c Sam Delmerico
* changes: convert java_plugin with bp2build convert java static dependencies
2022-02-01convert java static dependencies Sam Delmerico
This commit enables conversions of java_library_static and adds the static_deps Soong attribute to Bazel deps for all Java libraries. Currently, Soong handles static dependencies for Java differently, and Bp2build may need to address that later (see b/217236083). Bug: 215229742 Test: go test ./bp2build Change-Id: I4f86780c634dca0a2cfb9294084b14e139cc2375
2022-01-31Merge changes from topic "sdk_repo_license" Treehugger Robot
* changes: Generate sdk_repo notice files from license metadata Annotate more java dependencies for licensing Track transitive packaged license deps of containers
2022-01-29Basic bp2build converter for java_import. Romain Jobredeaux
This only supports the `jars` property/attribute. Test: b build external/error_prone:error_prone_core_jars Bug: 215229744 Change-Id: If0d9c8c4e9c1c560d35a501c20bef9361ef45e15
2022-01-28Annotate more java dependencies for licensing Colin Cross
Annotate more dependencies as runtime linked or toolchain. Bug: 207445310 Test: m checkbuild Change-Id: Ia5dc3321a1e476b16058eee94d6dc494fe1e933e
2022-01-27Merge "build device binary for java_test_host" Sam Delmerico
2022-01-26build device binary for java_test_host Sam Delmerico
This commit adds support for a java_host_test that requires a target binary to run. If the binary has host and target variants and is added as a dependency in the `data` attribute, then the host variant is used. Instead, we need a way to force the use of the target variant. Bug: 182919153 Test: add code from aosp/1647282/1 && atest AuthFsHostTest Change-Id: I68a6259b41a5e6809e1b82eec3122ffdf5067f56
2022-01-24Revert^2: "Setting Java 11 as the default version" Sorin Basca
Reverted Change: I2f9866deff41406aede24758f6eda5e5808c7f29 Reason for revert: Post-submission failure have been fixed. Test: presubmit Bug: 195387473 Change-Id: If5db1614ef455e2f1eae1d36cf514e13e7aab993
2022-01-20Revert "Setting Java 11 as the default version" Sorin Basca
Revert submission 1944928-default-java11 Reason for revert: Post-submit failures Reverted Changes: Ia9a0aa2a4:Setting Java 11 as the default version Ibf5d10521:Setting Java 11 as the default version Fixes: 215504708 Fixes: 215502091 Fixes: 215502091 Change-Id: I2f9866deff41406aede24758f6eda5e5808c7f29
2022-01-18Setting Java 11 as the default version Sorin Basca
Test: m Change-Id: Ia9a0aa2a4aa02d7b67ad8e1cb6083d33c3d75e70
2022-01-11Make android_app.stem overridable Jooyung Han
override_android_app can set "stem" property to set the APK name. Bug: 193504286 Test: m (soong test) Change-Id: I9ad66ea28bd1b030cb2c588d1f070d72e62ab1c7
2022-01-06Convert javacflags -> javacopts for java_binary_host Sam Delmerico
This has already been done for java_library modules, we need to add similar support for java_binary_host. Bug: 213456294 Test: go test ./bp2build Change-Id: Idf7b631f3afe9f59e50f9e45bcbdc29fb5923cc6
2021-12-20Adding option to include sources only for Java 11 builds Sorin Basca
Bug: 207852002 Test: m Test: EXPERIMENTAL_TARGET_JAVA_VERSION_11=true m Change-Id: I554a79798ea7f1dd4a96b09f761090f83a009cb4
2021-12-15Remove InstallBypassMake and ToMakePath Colin Cross
InstallBypassMake and ToMakePath are obsolete, remove them. Bug: 204136549 Test: m checkbuild Change-Id: Ie5a6f7254b3d317ed6039e114ed6aec35e1ce273
2021-12-14Add the initial implementation of bp2build converter for java_library, Wei Li
java_library_host, java_binary_host and cc_library_host_shared so signapk tool can be built with Bazel. Test: b build //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal Test: jarsigner -verify -verbose build.bazel.examples.apex.minimal.apex Bug: 209876137 Bug: 196204358 Bug: 210158864 Bug: 210159074 Bug: 210158872 Change-Id: I855884159d25e69d8f9623792c376da820a1eb4c
2021-12-11Merge changes from topic "revert-1918946-revert-1899703-AMWIVCREEV-CCTEXIRRRV" Treehugger Robot
* changes: Revert^2 "Add dependency license annotations" Revert^2 "Build license metadata files in Soong"
2021-12-10Revert^2 "Add dependency license annotations" Colin Cross
abe2a4b7bfc559255838cbc08a60f84eb5baf046 Change-Id: Ibcd16b5b779a4e6d4372dab9d21de76abae9ca9c
2021-12-10Merge changes from topic "revert-1899703-AMWIVCREEV" Colin Cross
* changes: Revert "Build license metadata files in Soong" Revert "Add dependency license annotations"
2021-12-10Revert "Add dependency license annotations" Colin Cross
Revert submission 1899703 Reason for revert: b/210158272 Reverted Changes: I142c19284:Reuse license metadata files from Soong Ife89b8f23:Add dependency license annotations I8e7410837:Build license metadata files in Soong Change-Id: I51f33ae67311a3cff00d3e581d24c9a3411b7131
2021-12-10Merge changes from topic "soong-license-metadata" Colin Cross
* changes: Add dependency license annotations Build license metadata files in Soong Escape Host*Variable contents
2021-12-10Merge "Adding experimental option to target Java 11" Sorin Basca
2021-12-08Add dependency license annotations Colin Cross
Add annotations to dependency tags that are dynamic or classpath linkage. Bug: 207445310 Test: m checkbuild Change-Id: Ife89b8f234aa40c380c721eda7dd18cab697fbb3
2021-12-07Adding experimental option to target Java 11 Sorin Basca
Bug: 195387073 Test: m Test: EXPERIMENTAL_TARGET_JAVA_VERSION_11=true m Change-Id: Ifd7ce6218a2761a8eaf79af7d91210da2fa581aa
2021-12-02Merge changes Ieb9aef29,I6985ebb6 Artur Satayev
* changes: Propagate min and max sdk versions to classpaths.proto configs. Introduce max_sdk_version device property.
2021-12-01Introduce max_sdk_version device property. satayev
Artifacts that go into apexes should only be active on certain SDK versions. There is now a need to upper bound the range to support expressiong statements like "this jar should only run on platforms 30-31". Bug: 190818041 Test: presubmit Change-Id: I6985ebb671841cdd9f0f37f916267ac5ed76e4f4
2021-11-26Adding configuration support for Java 11 Sorin Basca
Bug: 195387073 Test: m Change-Id: Ibf26f35b83b300acacae800f9962a00916869412
2021-11-10Add dependency from hostdex installed module to Make intermediates Colin Cross
The art tests rely on a dependency existing from out/host/linux-x86/framework/core-oj-hostdex.jar to out/host/common/obj/JAVA_LIBRARIES/core-oj-hostdex_intermediates/classes.jar, override LOCAL_SOONG_INSTALLED_MODULE for the hostdex modules so that soong_java_prebuilt.mk adds the dependency. Test: art/tools/buildbot-build.sh --host && art/tools/run-libcore-tests.sh '--mode=host' '--variant=X64' --debug Change-Id: I9412147fc66d5e5f0dae52d522868a37251f781e
2021-11-05Move java module installation into Soong Colin Cross
Move java module installation rules into Soong by overriding InstallBypassMake. Update the locations that find host java tools to look in the Make installation directory instead of the Soong installation directory, which will no longer be used. Bug: 204136549 Test: m checkbuild Change-Id: I5af6d764c97e7ddb5ee121fc9830166c25d831b1
2021-11-05Fix ctx.InstallFile calls for java modules Colin Cross
Call ctx.InstallFile on the primary install file last so that the primary install file can depend on the extra install files, and so that the primary install file can be inferred from the last installed file. Add missing ctx.InstallFile calls for the dexpreopt and hostdex outputs. Fix the install subdirectory for modules installing to the testcases directory. Bug: 204136549 Test: m checkbuild Change-Id: I7edd7647be27439d3ca0ecc589ca5e89d4ba8474
2021-10-26Dedup use of "prebuilt_" Paul Duffin
Bug: 177893770 Test: m nothing Change-Id: I664ee4d9c3aafda3de0a3f8985ee23f25db38680
2021-10-15Merge "Extract the logic of setting Uncompress_dex to a common place." Jiakai Zhang
2021-10-13Add android_sdk_repo_host to build platform-tools&build-tools Dan Willemsen
The Android SDK has been built with Make up until now, monolithically, then split up into several sdk-repo zip files for different purposes. The Mac and Windows SDKs really only need to contain the platform-tools and build-tools pieces, but due to this monolithic sdk zip, we had to build the whole SDK first. This adds an `android_sdk_repo_host` module that can build these platform-tools and build-tools zips. Bug: 187222815 Change-Id: I55809e1d7447dd65e22461f921b2b8abb6d5f822
2021-10-11Extract the logic of setting Uncompress_dex to a common place. Jiakai Zhang
Bug: 194150908 Test: m nothing Change-Id: Ia33965067586cfd48183e6d17f5d17626eef3c5a
2021-10-02Merge "Preopt APEX system server jars for java_import." Treehugger Robot
2021-10-01Merge changes from topics "bp-bionic-cts-tests", "cts-per-testcase-directory" Colin Cross
* changes: Add data_bins property Support per-testcase directories in all test suites Add environment variables to cc_genrule commands
2021-09-30Preopt APEX system server jars for java_import. Jiakai Zhang
Similar to aosp/1821985, but for java_import. Bug: 194150908 Test: See the next CL. Change-Id: Ied1cfb1a7e1c2eea502b74b0d6e2344bcd02155e
2021-09-30Add a new SDK member type java_systemserver_libs. Jiakai Zhang
Similar to java_boot_libs, java_systemserver_libs only provide access to their dex implementation jar for use by dexpreopting and do not provide an actual implementation jar. This is used in the subsequent CL. Bug: 194150908 Test: m nothing Change-Id: Ib2e7d5e6c002314a0231f46934a766f4a27e610a