Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Support for Kotlin

Marty Pitt April 20, 2016

Clover can't build projects that make use of Kotlin.  Is there a way to instruct Clover to invoke the Kotlin Maven build plugin when compiling / instrumenting code?  

Note - not generating test coverage for Kotlin files is fine (so long as they're excluded from coverage, not shown as "not tested"), but as it stands, the Clover compiler fails to build the project.

Unfortunately, this makes Clover a non-starter for our team.

1 answer

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 20, 2016

Could you give more details, please:

  1. Do you want to run a Kotlin project in Maven or in IDEA?
  2. Can you confirm that you want to measure code coverage for Java/Groovy files, but not Kotlin ones?
  3. How do you call Clover in your project?
Constantine Berdnikov February 27, 2018

Hi. I'm really interested in answer to this question.

1. Maven

2. No. My project is Java and Kotlin (mostly Kotlin) classes plus Spock for unit testing (Groovy 1.6.2)

3. I tried different ways but all I get is testing results without coverage.

Typical call looks like "mvn clean clover:setup test clover:aggregate clover:clover"

Is there a way to get coverage report?

Grzegorz Lewandowski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2018

@Constantine Berdnikov No there's no way of using Kotlin with Clover. 

morenoh149 March 1, 2019

Is this still the case?

Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 4, 2019

Hi Harry, there is no support for Kotlin, unfortunately. However, please note that Clover has been open-sourced (see this blog post for details). I encourage you to join the open-source community and contribute by adding support for this language. The OpenClover is one of the active forks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events