aboutsummaryrefslogtreecommitdiff
path: root/java/java.go
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge "Propagate max_sdk_version to manifest_fixer"William Loh2022-07-141-0/+11
|\ \ \ | |/ / |/| |
| * | Propagate max_sdk_version to manifest_fixerWilliam Loh2022-06-281-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If max_sdk_version is included in Android.bp that value will now be propagated to manifest_fixer.py. This value will then be used to override any maxSdkVersion attribute set on permission or uses-permission tags in the android manifest if maxSdkVersion="-1". Bug: 223902327 Test: add max_sdk_version to Android.bp for test app Test: create permission in test app manifest with maxSdkVersion="-1" Test: run test to check maxSdkVersion=max_sdk_version Change-Id: Ic533ef2a41b9ecc9ee68c69399026df47ee945b7
* | | Merge "Use the current java version for -jvm-target"Cole Faust2022-07-071-0/+14
|\ \ \
| * | | Use the current java version for -jvm-targetCole Faust2022-06-281-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of aosp/541879. In that cl, the kotlin jvm version was always set to 1.8 because that's what the kotlin complier supported at the time, but now it supports more versions: $ ./external/kotlinc/bin/kotlinc -jvm-target foo error: unknown JVM target version: foo Supported versions: 1.6, 1.8, 9, 10, 11, 12, 13, 14, 15, 16, 17 Bug: 69160377 Bug: 236431222 Test: Treehugger Change-Id: I273e0b4d1f484013889e17c60bc1b299a3f975a1
* | | | Stop exporting systemserverclasspath_fragment when targeting SPaul Duffin2022-07-051-0/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when targeting the S release the generated sdk snapshot would contain prebuilt_systemserverclasspath_fragment modules even though they were only added in T. This allows SdkMemberTypes to specify the set of target build releases they support and ignores them when targeting an unsupported target build release. Test: m nothing packages/modules/common/build/mainline_modules_sdks.sh # Check that the for-S-build snapshots do not include SSCPFs. Bug: 237718221 Change-Id: I2df08c2fcebf9b866695d691572a9d3783758b17
* | | Fix normalize string for Java 17Sorin Basca2022-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | Bug: 233029164 Test: EXPERIMENTAL_TARGET_JAVA_VERSION_17=true \ EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN=true m Change-Id: Ic436f813ae19cbdb089c63421ffde70a9cdbd83d
* | | add multilib data_device_bins propertiesSam Delmerico2022-06-061-9/+124
|/ / | | | | | | | | | | | | | | | | | | | | 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
* | Add experimental option to target Java 17Sorin Basca2022-05-241-2/+13
| | | | | | | | | | | | | | Bug: 233029164 Test: EXPERIMENTAL_TARGET_JAVA_VERSION_17=true \ EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN=true m Change-Id: I80a9ba9eb356a460c1036e711e793c2ca6620f53
* | Merge "Clean up some bp2build technical debt"Treehugger Robot2022-05-231-2/+2
|\ \
| * | Clean up some bp2build technical debtLiz Kammer2022-05-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we ran mutators in bp2build mode to add dependencies, now we look up modules by name directly. Remove workarounds to allow bp2build mode to not fail when adding/handling dependencies. Test: m bp2build Change-Id: Ibf6fd905150cac306e5c395902ef28f609f4df2a
* | | Merge "Don't call dexpreopter methods on host modules"Colin Cross2022-05-191-6/+8
|\ \ \ | |/ / |/| |
| * | Don't call dexpreopter methods on host modulesColin Cross2022-05-171-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Only call the dexpreopter methods on device modules so broken dexpreopt configs don't break host-only unbundled builds. Bug: 207813628 Test: tradefed branch builds Change-Id: I41deb765a29c5cef9130a4d26aad7f956f75cdd5
* | | convert java_resources with bp2buildSam Delmerico2022-05-101-1/+44
|/ / | | | | | | | | | | Test: b build --platforms=//build/bazel/platforms:linux_x86 //external/jarjar:jarjar-binary and try to use on a jar Change-Id: Id6f4e6937687fd575360fbacaeda55c41922636e
* | Merge "Revert "Don't add `uses_libs`/`optional_uses_libs` to the ↵Treehugger Robot2022-05-041-17/+11
|\ \ | | | | | | | | | manifest_fixer.""
| * | Revert "Don't add `uses_libs`/`optional_uses_libs` to the manifest_fixer."Ulya Trafimovich2022-05-041-17/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0b1c70efbcbb0c8408f44964923f5b156d025936. The reverted commit was based on the idea that uses-libraries that are explicitly specified in build files should not be implicitly added to the manifest, as that would mean that anything added to the build files will flow to the manifest. Although this logic is correct, it prevents propagation of uses-libraries from dependencies, which is wrong: if a library has an explicit uses-library property in Android.bp, this property is expected to be propagated to the library's dependencies. Failing to do so would mean that every user of that library has to add uses-library property to their build files, which doesn't scale (see b/214255490 for example). Bug: 214255490 Test: lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd \ && adb wait-for-device && adb root \ && adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch' # empty output, no errors at boot Change-Id: I6f420e76a89aa2f37be99f877711736640f2c361
* / bp2build converts java_version property to javacopts attributeVinh Tran2022-04-281-0/+5
|/ | | | | | | | | | This CL also converts `external/rappor` (which already set `java_version` to `1.7`) to be bazelable to testify the changes. Results from `b build //external/rappor && cat bazel-bin/external/rappor/librappor.jar-0.params`: https://paste.googleplex.com/5518725462622208. Test: go test ./bp2build/... Bug: 227618664 Change-Id: I8d370d4639f70fba51e6de6ceb7bcb5ace9ccd91
* convert logtags in java srcsSam Delmerico2022-04-081-3/+28
| | | | | | | | 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
* Merge "support errorprone javacflags"Treehugger Robot2022-04-051-4/+11
|\
| * support errorprone javacflagsSam Delmerico2022-03-311-4/+11
| | | | | | | | | | | | | | | | 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
* | convert java_import jars with arch variantsSam Delmerico2022-03-311-2/+10
|/ | | | | | | Bug: 220168131 Test: go test ./bp2build -run TestJavaImport Test: b build '...' Change-Id: Ib485e6905e7be9d199af5295b23131c226fd6e96
* add plugins to javaLibraryAttributesSam Delmerico2022-03-301-0/+4
| | | | | Test: go test ./bp2build Change-Id: I8e4c3f373c62c60ea5013cd8c585915a366c1f81
* convert java_import_host with bp2build; enable jetifierSam Delmerico2022-03-301-0/+1
| | | | | | | | | | | 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
* emulate java_library static_deps with Bazel exportsSam Delmerico2022-03-301-43/+82
| | | | | | | | | | | | | | | | | | 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
* Don't pass static libs to r8Colin Cross2022-03-181-4/+23
| | | | | | | | | | | | 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
* bp2build supports arch variant srcs for java_librarySam Delmerico2022-03-071-2/+10
| | | | | | Bug: 209577426 Test: build/bazel/ci/bp2build.sh Change-Id: I6799bda904d286616e580f2395601ce4f764180f
* bp2build java_libraries depend on Android SDKSam Delmerico2022-03-071-0/+5
| | | | | | | | | | | 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
* convert java proto libraries with bp2buildSam Delmerico2022-02-151-1/+15
| | | | | | | | | Allow java_libraries that depend on protobufs to be converted with bp2build. Bug: 215230097 Test: build/bazel/ci/bp2build.sh Change-Id: I3ce52389e7e4e82755605ee277c1e527a6aebc6b
* Use common java library attributes for android_app bp2build converter.Romain Jobredeaux2022-02-021-0/+1
| | | | | Change-Id: I4dc7600fbe80eddc54a7fadd6418d6911af0b7f2 Test: go test ./bp2build
* Merge changes I09902215,I4f86780cSam Delmerico2022-02-021-2/+14
|\ | | | | | | | | | | * changes: convert java_plugin with bp2build convert java static dependencies
| * convert java static dependenciesSam Delmerico2022-02-011-2/+14
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge changes from topic "sdk_repo_license"Treehugger Robot2022-01-311-5/+10
|\ \ | |/ |/| | | | | | | | | * changes: Generate sdk_repo notice files from license metadata Annotate more java dependencies for licensing Track transitive packaged license deps of containers
| * Annotate more java dependencies for licensingColin Cross2022-01-281-5/+10
| | | | | | | | | | | | | | | | Annotate more dependencies as runtime linked or toolchain. Bug: 207445310 Test: m checkbuild Change-Id: Ia5dc3321a1e476b16058eee94d6dc494fe1e933e
* | Basic bp2build converter for java_import.Romain Jobredeaux2022-01-291-0/+20
|/ | | | | | | | This only supports the `jars` property/attribute. Test: b build external/error_prone:error_prone_core_jars Bug: 215229744 Change-Id: If0d9c8c4e9c1c560d35a501c20bef9361ef45e15
* Merge "build device binary for java_test_host"Sam Delmerico2022-01-271-2/+36
|\
| * build device binary for java_test_hostSam Delmerico2022-01-261-2/+36
| | | | | | | | | | | | | | | | | | | | | | 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
* | Revert^2: "Setting Java 11 as the default version"Sorin Basca2022-01-241-7/+1
|/ | | | | | | | | | Reverted Change: I2f9866deff41406aede24758f6eda5e5808c7f29 Reason for revert: Post-submission failure have been fixed. Test: presubmit Bug: 195387473 Change-Id: If5db1614ef455e2f1eae1d36cf514e13e7aab993
* Revert "Setting Java 11 as the default version"Sorin Basca2022-01-201-1/+7
| | | | | | | | | | | | | | 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
* Setting Java 11 as the default versionSorin Basca2022-01-181-7/+1
| | | | | Test: m Change-Id: Ia9a0aa2a4aa02d7b67ad8e1cb6083d33c3d75e70
* Make android_app.stem overridableJooyung Han2022-01-111-0/+1
| | | | | | | | override_android_app can set "stem" property to set the APK name. Bug: 193504286 Test: m (soong test) Change-Id: I9ad66ea28bd1b030cb2c588d1f070d72e62ab1c7
* Convert javacflags -> javacopts for java_binary_hostSam Delmerico2022-01-061-0/+6
| | | | | | | | | 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
* Adding option to include sources only for Java 11 buildsSorin Basca2021-12-201-1/+1
| | | | | | | Bug: 207852002 Test: m Test: EXPERIMENTAL_TARGET_JAVA_VERSION_11=true m Change-Id: I554a79798ea7f1dd4a96b09f761090f83a009cb4
* Remove InstallBypassMake and ToMakePathColin Cross2021-12-151-2/+0
| | | | | | | | InstallBypassMake and ToMakePath are obsolete, remove them. Bug: 204136549 Test: m checkbuild Change-Id: Ie5a6f7254b3d317ed6039e114ed6aec35e1ce273
* Add the initial implementation of bp2build converter for java_library,Wei Li2021-12-141-0/+107
| | | | | | | | | | | | | | 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
* Merge changes from topic "revert-1918946-revert-1899703-AMWIVCREEV-CCTEXIRRRV"Treehugger Robot2021-12-111-11/+26
|\ | | | | | | | | | | * changes: Revert^2 "Add dependency license annotations" Revert^2 "Build license metadata files in Soong"
| * Revert^2 "Add dependency license annotations"Colin Cross2021-12-101-11/+26
| | | | | | | | | | | | abe2a4b7bfc559255838cbc08a60f84eb5baf046 Change-Id: Ibcd16b5b779a4e6d4372dab9d21de76abae9ca9c
* | Merge changes from topic "revert-1899703-AMWIVCREEV"Colin Cross2021-12-101-26/+11
|\| | | | | | | | | | | * changes: Revert "Build license metadata files in Soong" Revert "Add dependency license annotations"
| * Revert "Add dependency license annotations"Colin Cross2021-12-101-26/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge changes from topic "soong-license-metadata"Colin Cross2021-12-101-11/+26
|\| | | | | | | | | | | | | * changes: Add dependency license annotations Build license metadata files in Soong Escape Host*Variable contents
| * Add dependency license annotationsColin Cross2021-12-081-11/+26
| | | | | | | | | | | | | | | | | | Add annotations to dependency tags that are dynamic or classpath linkage. Bug: 207445310 Test: m checkbuild Change-Id: Ife89b8f234aa40c380c721eda7dd18cab697fbb3
* | Merge "Adding experimental option to target Java 11"Sorin Basca2021-12-101-0/+6
|\ \ | |/ |/|