update targetSdkVersion to 28 (#842)

* update targetSdkVersion to 28

* update robolectric to support api 28
This commit is contained in:
Konrad Pozniak 2018-09-16 19:23:32 +02:00 committed by GitHub
parent 4402f3d337
commit dbb3f4e826
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View file

@ -13,12 +13,12 @@ def getGitSha = { ->
} }
android { android {
compileSdkVersion 27 compileSdkVersion 28
buildToolsVersion '27.0.3' buildToolsVersion '28.0.2'
defaultConfig { defaultConfig {
applicationId "com.keylesspalace.tusky" applicationId "com.keylesspalace.tusky"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 27 targetSdkVersion 28
versionCode 49 versionCode 49
versionName "3.1" versionName "3.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@ -58,7 +58,7 @@ android {
} }
} }
ext.supportLibraryVersion = '27.1.1' ext.supportLibraryVersion = '28.0.0-rc02'
ext.daggerVersion = '2.17' ext.daggerVersion = '2.17'
@ -104,7 +104,7 @@ dependencies {
implementation "com.google.dagger:dagger-android:$daggerVersion" implementation "com.google.dagger:dagger-android:$daggerVersion"
implementation "com.google.dagger:dagger-android-support:$daggerVersion" implementation "com.google.dagger:dagger-android-support:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion" kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
testImplementation 'org.robolectric:robolectric:3.8' testImplementation 'org.robolectric:robolectric:4.0-alpha-3'
testImplementation 'org.mockito:mockito-inline:2.21.0' testImplementation 'org.mockito:mockito-inline:2.21.0'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', { androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'

View file

@ -68,7 +68,7 @@ object AppInjector {
if (activity is FragmentActivity) { if (activity is FragmentActivity) {
activity.supportFragmentManager.registerFragmentLifecycleCallbacks( activity.supportFragmentManager.registerFragmentLifecycleCallbacks(
object : FragmentManager.FragmentLifecycleCallbacks() { object : FragmentManager.FragmentLifecycleCallbacks() {
override fun onFragmentCreated(fm: FragmentManager?, f: Fragment?, override fun onFragmentCreated(fm: FragmentManager, f: Fragment,
savedInstanceState: Bundle?) { savedInstanceState: Bundle?) {
if (f is Injectable) { if (f is Injectable) {
AndroidSupportInjection.inject(f) AndroidSupportInjection.inject(f)

View file

@ -174,7 +174,7 @@ class AccountMediaFragment : BaseFragment(), Injectable {
recycler_view.addOnScrollListener(object : RecyclerView.OnScrollListener() { recycler_view.addOnScrollListener(object : RecyclerView.OnScrollListener() {
override fun onScrolled(recycler_view: RecyclerView?, dx: Int, dy: Int) { override fun onScrolled(recycler_view: RecyclerView, dx: Int, dy: Int) {
if (dy > 0) { if (dy > 0) {
val itemCount = layoutManager.itemCount val itemCount = layoutManager.itemCount
val lastItem = layoutManager.findLastCompletelyVisibleItemPosition() val lastItem = layoutManager.findLastCompletelyVisibleItemPosition()

View file

@ -26,7 +26,7 @@ import com.keylesspalace.tusky.adapter.ThreadAdapter
class ConversationLineItemDecoration(private val context: Context, private val divider: Drawable) : RecyclerView.ItemDecoration() { class ConversationLineItemDecoration(private val context: Context, private val divider: Drawable) : RecyclerView.ItemDecoration() {
override fun onDraw(canvas: Canvas, parent: RecyclerView, state: RecyclerView.State?) { override fun onDraw(canvas: Canvas, parent: RecyclerView, state: RecyclerView.State) {
val dividerStart = parent.paddingStart + context.resources.getDimensionPixelSize(R.dimen.status_line_margin_start) val dividerStart = parent.paddingStart + context.resources.getDimensionPixelSize(R.dimen.status_line_margin_start)
val dividerEnd = dividerStart + divider.intrinsicWidth val dividerEnd = dividerStart + divider.intrinsicWidth