summaryrefslogtreecommitdiff
path: root/java/kotlin_test.go
AgeCommit message (Collapse)Author
2021-03-24Remove uses of buildDir from java/kotlin_test.goPaul Duffin
Remove any uses, either direct (or indirect via testJavaConfig or similar methods), of the package level buildDir variable from this file. Bug: 182885307 Test: m nothing Change-Id: Id1d449d55fe992ebc3d7bad38a76bb1652844f52
2020-11-19Support extra checks for ErrorProne in a dedicated propertyColin Cross
Previous extra checks for ErrorProne were added using the plugins proeprty to get them into the -processorpath argument. This works fine for java-only modules, but fails for mixed java+kotlin modules because the processorpath is given to kapt and not javac. Add a dedicated errorprone.extra_check_modules property (mirroring the lint.extra_check_modules property), and add that to a separate processorpath that is used only for errorprone rules and not cleared when kotlin is used. Test: TestKapt/errorprone Change-Id: Id6ef02ce758532d1df8b8d969fad83bb44fe93ab
2020-10-09Revert "Make lots of tests run in parallel"Colin Cross
This reverts commit 323dc60712491c71ccdc5363c42df61f0a192487. Reason for revert: Possible cause of test instability Bug: 170513220 Test: soong tests Change-Id: Iee168e9fbb4210569e6cffcc23e60d111403abb8
2020-10-06Make lots of tests run in parallelColin Cross
Putting t.Parallel() in each test makes them run in parallel. Additional t.Parallel() could be added to each subtest, although that requires making a local copy of the loop variable for table driven tests. Test: m checkbuild Change-Id: I5d9869ead441093f4d7c5757f2447385333a95a4
2020-04-22Repeat kapt processor argument for multiple processorsColin Cross
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
2019-07-17Java test code clean-upJaewoong Jung
Remove unused parameters and make testJava return the config. Test: Ran all java tests. Change-Id: Iaa123f3fd93188e2f55452b887e1d340429cc710
2019-01-24Remove annotation_processors propertyColin Cross
Now that there are no uses left of annotation_processors remove the property. If there are no annotation processor classes for javac for a module, due to an empty "plugins" property or using kapt for annotation processors, pass -proc:none to javac to ensure it does not try to run any annotation processors found in the classpath. Bug: 77284273 Test: plugin_test.go, kotlin_test.go Change-Id: I3823d9fec8d3d07d2e49b1d97839f7fcbdd35647
2019-01-23Fix kotlin annotation processing after java_pluginColin Cross
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
2019-01-23Replace annotation_processors with pluginsColin 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
2019-01-22Pass annotation processors to kotlincColin Cross
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
2019-01-22Move kotlin to it's own fileColin Cross
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