Adding Support Library to Robolectric 2.3

后端 未结 1 1098
孤独总比滥情好
孤独总比滥情好 2021-01-27 12:25

After inspiration from this template, I was able to get roblolectric and espresso tests working with android and gradle. The key was to store robolectric in it\'s own module. Ho

相关标签:
1条回答
  • 2021-01-27 12:53

    Theoretically, instead of copying those files into the local maven repository, you should be able to use android repository directly:

    apply plugin: 'java'
    
    repositories {
        def androidHome = System.getenv("ANDROID_HOME")
        maven {
            url "$androidHome/extras/android/m2repository/"
        }
    }
    

    Note, that you have to install Android Support Repository & Google Repository first through the SDK Manager.

    0 讨论(0)
提交回复
热议问题