aboutsummaryrefslogtreecommitdiff
path: root/java/kotlin.go
Commit message (Collapse)AuthorAgeFilesLines
* Enable compose kotlinc plugin when depending on the compose runtimeColin Cross2021-09-201-0/+1
| | | | | | | | | When a module depends on the compose runtime add a -Xplugin argument to the kotlinc flags that enables the compose compiler plugin. Bug: 196351110 Test: TestKotlinCompose Change-Id: I423a3c4d12df42804a24b672a40a165bc8dd165f
* Silence kotlinc JDK9 warningsColin Cross2021-03-311-4/+5
| | | | | | | | Silence the "Illegal reflective access" warning from kotlinc tracked by https://youtrack.jetbrains.com/issue/KT-43704 Test: m SystemUI Change-Id: I98eaf530c69cc4d3cefe09f5feab54c764352912
* Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputListColin Cross2021-03-161-1/+3
| | | | | | | | | | Using $out.rsp as the rsp file adds extra complexity around keeping the $ unescaped. Make callers to FlagWithRspFileInputList provide an explicit path for the rsp file instead. Bug: 182612695 Test: rule_builder_test.go Change-Id: I3f531d80c1efa8a9d09aac0a63790c5b11a9f0c6
* Pass pctx and ctx to NewRuleBuilderColin Cross2020-12-011-2/+2
| | | | | | | | | | | Enable the RuleBuilder and RuleBuilderCommand methods to access the BuilderContext by passing it to NewRuleBuilder instead of RuleBuilder.Build. Test: genrule_test.go Test: rule_builder_test.go Test: m checkbuild Change-Id: I63e6597e19167393876dc2259d6f521363b7dabc
* Support kotlin multiplatform sourcesColin Cross2020-07-061-15/+49
| | | | | | | | Add a common_srcs property and propagate it to the module.xml file passed to kotlinc. Test: m checkbuild Change-Id: Ief768bafb943513c9ffbc01e829abc078f0a72bc
* Move gen-kotlin-build-file.sh to pythonColin Cross2020-06-261-4/+8
| | | | | | | | Kotlin common multiplatform sources support will require more complexity in gen-kotlin-build-file.sh, move it to python instead. Test: m checkbuild Change-Id: I02312160ad781877f1fec971168331c0dcecf136
* Fix annotation processors in kotlin modules that generate resourcesColin Cross2020-06-181-8/+13
| | | | | | | | | | | The kapt rule was only keeping the generated sources, and not the generated classes directory. The generated classes directory will contain resources generated by the annotation processor and needs to be added to the final jar. Test: m ApiFinder Bug: 153485543 Change-Id: I89197d0afcb1eee011c01aa400f9977e66f43768
* Repeat kapt processor argument for multiple processorsColin Cross2020-04-221-2/+5
| | | | | | | | | | | | | | | kapt claims to support a comma separated list of annotation processors, but it errors if multiple annotation processors are given. Surrounding the the list with {} does not error, but it also doesn't even warn if the second element in the list is garbage, so it may not be running the second processor. Repeat the processor argument for each annotation processor class instead. Bug: 154736649 Test: TestKapt Test: m checkbuild Change-Id: I4c7c161dbf867d7fba1aaf16fd5e502647e3f682
* Add support for experimentally enabling RBE support on specific rules.Ramy Medhat2020-01-281-2/+2
| | | | | | | | This CL adds RBE support to javac, r8, and d8 rules which is only enabled if respective environment variables are set. Test: an aosp_crosshatch build with and without the new variables. Change-Id: Ic82f3627944f6a5ee7b9f3228170c2709b1bfcb8
* Fix turbine classpath argumentsColin Cross2019-11-071-1/+1
| | | | | | | | | We were passing "--classpath foo.jar --classpath bar.jar" to turbine, it now wants (and may always have expected?) "--classpath foo.jar bar.jar". Test: m checkbuild Change-Id: Ib7e0ca64a34e236110f7b785d6a0fb51ed75567e
* Run non-RBE supported actions in the local pool when USE_RBE is set.Ramy Medhat2019-11-051-2/+2
| | | | | | Bug: 143938974 Test: ran CTS build at -j500 successfully. Change-Id: I55074bd67308cd716972e24fb56a20bc393d5d9d
* Make javaVersion an enumColin Cross2019-10-281-2/+2
| | | | | | | | Remove the hardcoded checks against "1.9" by making javaVersion an enum and implementing javaVersion.usesJavaModules(). Test: TestClasspath Change-Id: I559eeb1f45880bb8177269c6d977ee4dfbadce57
* Add another jar used by kotlincDan Willemsen2019-06-131-0/+1
| | | | | | Bug: 130111713 Test: treehugger Change-Id: If25be6047625cec4ed9802142876cfd8e9ccd3eb
* Don't hide *.kotlin_module in turbine dependenciesColin Cross2019-05-081-4/+14
| | | | | | | | | | | | | | | | The jars containing the merged header classes from transitive static dependencies were stripping all of META-INF/. Kotlin puts metadata in META-INF that is used to map the package to the static class that contains the package-level functions. This also exposed that the metadata in META-INF is always called "name.kotlin_module", so a library that contains kotlin files with a dependency that also contains kotlin files would shade the metadata file. Use a unique name instead. Fixes: 131709692 Test: m checkbuild Change-Id: I5cd276e563206e37c4c0d90fe9f346e9396f88c0
* Zip boot imageColin Cross2019-04-111-3/+5
| | | | | | | Create a zip file containing the zipped boot image files. Test: m out/soong/sailfish/dex_bootjars/boot.zip Change-Id: I1b08c9aca962a5999585cbe9e665693ef4558524
* Add extra used dependenciesDan Willemsen2019-04-091-0/+5
| | | | | | | | | Found while executing the build actions remotely. Bug: 130111713 Test: treehugger Test: run actions remotely with given dependencies, they pass. Change-Id: I2bff8fb8ccf50fde446d6bcef0f1dca9b2974b4b
* Clean up srcjar directories after each ruleColin Cross2019-01-251-2/+4
| | | | | | | | The srcjar directories just confuse people looking for generated files, clean them up after each rule. Test: m checkbuild Change-Id: If712ce7d4922619fd8420ae8f89830fe7824114d
* Fix kotlin annotation processing after java_pluginColin Cross2019-01-231-1/+1
| | | | | | | | | | | | I37c1e80eba71ae2d6a06199fb102194a51994989 broke kotlin annotation processing with a typo in the processors flag to kapt and by passing -processor to javac with an empty processorpath. Bug: 77284273 Bug: 122251693 Test: kotlin_test.go Test: m checkbuild Change-Id: I17c45d5b3f9df089231af5d2930646ad0e6bf9be
* Replace annotation_processors with pluginsColin Cross2019-01-231-1/+9
| | | | | | | | | | | | | | | | | 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
* Pass annotation processors to kotlincColin Cross2019-01-221-5/+102
| | | | | | | | | | Enable the kotlin-annotation-processing plugin and pass annotation processors to it. Bug: 122251693 Test: m checkbuild Test: TestKapt in kotlin_test.go Change-Id: I841df454beaaa7edd263eea714ca0d958a03c9de
* Move kotlin to it's own fileColin Cross2019-01-221-0/+71
kapt is going to make kotlin a little more complicated, move the rules and tests to their own files. Bug: 122251693 Test: m checkbuild Change-Id: Ieed78b97995ced210b710bd50c357514cc8e3bc6