Franc
Franc

Reputation: 41

Kotlin unit tests in android studio

I am using Android studio RC2. When I try to run kotlin unit tests through android studio, gradle executes the assembleDebug task and creates a debug apk before running the test. With Java unit tests, it doesn't do this.

Is there a workaround for this? Kotlin unit tests are slow and take a minute to just setup and rub.

Thanks

Upvotes: 3

Views: 767

Answers (1)

Kamer358
Kamer358

Reputation: 2450

Yes, there is a workaround.

You should create a configuration that will run your tests then remove "Gradle-aware Make" from "Before launch" list and add gradle task you want (e.g. generateDebugSources compileDebugUnitTestSources compileDebugSources)

Update

Fixed in AS 3.1

Upvotes: 3

Related Questions