PagerSlidingTabStrip icon indicating copy to clipboard operation
PagerSlidingTabStrip copied to clipboard

Library should not enforce targetSdkVersion

Open mpost opened this issue 11 years ago • 3 comments

Currently the library has targetSdkVersion=19 defined. That means if the consuming app does not use 19 the build will fail. This is a problem when eg. using robolectric which does not yet work with targetSdkVersion 19 but only supports 18. The library can not be used in such a case.

mpost avatar Jan 18 '14 10:01 mpost

Yes it can. Simply annotate the unit tests (method or whole class) with @Config(emulateSdk = 18).

ChristianKatzmann avatar Jan 18 '14 15:01 ChristianKatzmann

@ChristianBecker Thanks for the hint. But can this be set inside the RobolectricTestRunner? Setting the emulateSdk on every test seams very redundant.

mpost avatar Jan 31 '14 11:01 mpost

Kind of. You can create a file named org.robolectric.Config.properties in the test/resources directory (src/test/resources/org.robolectric.Config.properties) with the following content:

emulateSdk: 18
reportSdk: 18

This file will then apply the config for the whole test suite. Cf. http://robolectric.blogspot.de/2013/05/configuring-robolectric-20.html

ChristianKatzmann avatar Jan 31 '14 12:01 ChristianKatzmann