Search code examples
androidandroid-support-libraryandroidxandroidx-test

In which AndroidX library is the androidx.test.annotation package located?


Simple question:

How can I use the androidx.test.annotation package? In which AndroidX library is it located? I'm specifically looking to use androidx.test.annotation.UiThreadTest. This annotation is the continuation of android.support.test.annotation.UiThreadTest from pre-AndroidX times.

This package is not listed on the AndroidX Migrate page. Is it included in another library? If so, which one? I cannot find it for the life of me. Package search within the IDE comes up with nothing.


Solution

  • It is in androidx.test:rules:

    androidTestImplementation 'androidx.test:rules:1.2.0'