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 {
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'

View file

@ -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)

View file

@ -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()

View file

@ -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