summaryrefslogtreecommitdiff
path: root/java/plugin.go
AgeCommit message (Collapse)Author
2025-01-15Convert collectDeps and collectTransitiveHeaderJarsForR8 to use ModuleProxy. Yu Liu
Bug: 377723687 Test: Unit tests and compare the ninja and mk files generated. Change-Id: I957c09bba8fc047cb8959461294d8879486185a6
2024-10-17Add support for kotlin plugins Luca Stefani
Use the already existing hooks used by the compose compiler plugin to support kotlin plugins bundled alongside the compiler such as kotlin-serialize-compiler Test: m, sample app with kotlin-serialize-compiler Change-Id: I4d5fa6cd42acfc90ef437222e9e07f61c259d565
2023-12-08Remove ConvertWithBp2build implementations Colin Cross
Remove the ConvertWithBp2build implementations from all the module types, along with the related code. Bug: 315353489 Test: m blueprint_tests Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
2023-09-20Have ConvertWBp2build use Bp2buildMutatorContext Chris Parsons
This no-op refactoring facilitates some upcoming functional changes for "bp2build allowlist v2". The work requires that the bp2build conversion mutator be changed from a TopDown mutator to a BottomUp mutator. Refactoring all bp2build-related methods so that they use Bp2buildMutatorContext makes it easier to make this functional change without touching tens of files and multiple projects. Bug: 285631638 Test: m bp2build Change-Id: I3d1ef3064146e959c6f0dc315350fc9764bf2bd2
2023-08-04Add unconverted reason for jarjar incompatibility. Liz Kammer
Test: m bp2build Change-Id: I112b84fa53f57b9df2bd1e1616012fe55b48001e
2022-11-15bp2build for java_library with .kt srcs or common_srcs Alix
java_library modules with .kt srcs or common_srcs will be converted into module type kt_jvm_library Test: m bp2build, manually inspected build files for allowlisted modules Bug: 258688914 Change-Id: I8293a11c8247b4b76358d0991f82c6b61b58adc3
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-02-03add target_compatible_with stanza for host targets Sam Delmerico
Soong modules that are specific for the host platform (e.g. java_library_host, cc_binary_host, java_genrule_host, etc.) should not be built on the target platform (Android), so we add a target_compatible_with attribute to skip this type of module on an Android target build. Bug: 215229742 Test: go test ./bp2build Change-Id: Ifb76ef4e0dc4cb3adb6a64b5c375ce36f7973e48
2022-02-01convert java_plugin with bp2build Sam Delmerico
Also, because java_plugin is only intended to be built for the host platform to make additions to the javac compiler, a compatibility requirement is added to java_plugin that ensure that it is not built for android targets. Bug: 215229742 Test: go test ./bp2build Change-Id: I09902215a9f1e8b14d4de5a51328d08a7a0a4450
2021-03-24Register java_plugin in PrepareForTestWithJavaBuildComponents Paul Duffin
Bug: 182885307 Test: m nothing Change-Id: I550d39ba46c548b6b099d8dc6a9c458ca931b2fa
2020-06-15Consolidate adding common java properties Colin Cross
Use a method to add the properties that are present on all java modules. Bug: 153485543 Test: m checkbuild Change-Id: I7803b15eb0de810c8ab8d4b9acf2511935a26fb6
2019-01-23Replace annotation_processors with plugins Colin Cross
Follow bazel's modules for annotation processors by introducing a java_plugin module type that can contain extra metadata about the annotation processor, the processor class and a flag to specify if the annotation processor is compatible with the turbine optimization. Deprecate the annotation_processors property, which took a list of java_library_host modules, in favor of the plugins property, which takes a list of java_plugin modules. The annotation_processors property will be removed once all uses have been replaced with plugins. Bug: 77284273 Test: plugin_test.go Test: m caliper Change-Id: I37c1e80eba71ae2d6a06199fb102194a51994989