update targetSdkVersion to 28 (#842)

* update targetSdkVersion to 28

* update robolectric to support api 28
main
Konrad Pozniak 6 years ago committed by GitHub
parent 6a7ec93b98
commit 3e2dc9f79b
  1. 10
      app/build.gradle
  2. 2
      app/src/main/java/com/keylesspalace/tusky/di/AppInjector.kt
  3. 2
      app/src/main/java/com/keylesspalace/tusky/fragment/AccountMediaFragment.kt
  4. 2
      app/src/main/java/com/keylesspalace/tusky/view/ConversationLineItemDecoration.kt

@ -13,12 +13,12 @@ def getGitSha = { ->
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileSdkVersion 28
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "com.keylesspalace.tusky"
minSdkVersion 21
targetSdkVersion 27
targetSdkVersion 28
versionCode 49
versionName "3.1"
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'
@ -104,7 +104,7 @@ dependencies {
implementation "com.google.dagger:dagger-android:$daggerVersion"
implementation "com.google.dagger:dagger-android-support:$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'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'

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

@ -174,7 +174,7 @@ class AccountMediaFragment : BaseFragment(), Injectable {
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) {
val itemCount = layoutManager.itemCount
val lastItem = layoutManager.findLastCompletelyVisibleItemPosition()

@ -26,7 +26,7 @@ import com.keylesspalace.tusky.adapter.ThreadAdapter
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 dividerEnd = dividerStart + divider.intrinsicWidth

Loading…
Cancel
Save