Jvm options in android when run gradlew test

前端 未结 3 639
无人及你
无人及你 2020-12-14 18:27

I have a project that using Robolectric for unit test purpose. This project uses Robolectric 3.0 and need to add -ea and -noverify options in Virtu

3条回答
  •  执笔经年
    2020-12-14 18:54

    It is already answered but this may be an easier solution:

    In your application modules' build.gradle file in android closure, add this.

    android {
      ....
    
      testOptions {
        unitTests.all {
          jvmArgs '-noverify'
        }
      }
    }
    

提交回复
热议问题