Kotlin Unit Tests Run Configurations in Android Studio


#1

Hi,

I am using Android Studio 3.0.1 and Kotlin 1.2.10 for my Android project.

When I run unit tests written in Kotlin (e.g. right click > Run), the Run Configuration that is created does not use the Android JUnit template. This means the project is built using the gradle assemble tasks instead of the compile tasks (used by the Android JUnit Run Configurations). This increases the build time significantly (~10x on my machine).
It seems that this behavior is controlled by the Kotlin plugin

See also https://issuetracker.google.com/issues/37028496

Is there a way to use the Android Junit Run Configuration template as a default for Kotlin unit tests?