Running kotlin tests with gradlew will throw java.lang.SecurityException : Running test from the terminal with:

    ./gradlew testAppReleaseUnitTest --tests namespace.test.class

Throws a:

    java.lang.SecurityException at Class.kt:42

Running the same test from android studio works fine.

Any ideas why?
