Skip to content
Permalink
Browse files

Update Jetpack libraries for July 2nd release

- AppCompat 1.1.0-rc01
- ExifInterface 1.1.0-beta01
- Fragment 1.2.0-alpha01
- Lifecycle 2.2.0-alpha02
- Navigation 2.1.0-alpha06
- Preference 1.1.0-rc01
- RecyclerView 1.1.0-beta01

With this, we can remove explicit dependencies on lifecycle-runtime-ktx and lifecycle-viewmodel-ktx when using fragment-ktx:1.2.0-alpha01 as they are now pulled in as a transitive dependency via activity-ktx.

We also can remove calls to ViewCompat.requestApplyInsets(view) in onViewCreated() since that is done for us by FragmentManager.
  • Loading branch information...
ianhanniballake committed Jul 6, 2019
1 parent e1b437d commit 2ac5650b5e1ee9d36677992a060de0c7174869a7
@@ -19,28 +19,28 @@ buildscript {
compileSdkVersion = 29
targetSdkVersion = 29

appCompatVersion = '1.1.0-beta01'
appCompatVersion = '1.1.0-rc01'
browserVersion = '1.0.0'
constraintLayoutVersion = '2.0.0-beta2'
coreVersion = '1.2.0-alpha02'
coroutinesVersion = '1.2.2'
crashlyticsVersion = '2.10.1'
drawerLayoutVersion = '1.1.0-alpha02'
exifInterfaceVersion = '1.1.0-alpha01'
exifInterfaceVersion = '1.1.0-beta01'
firebaseCoreVersion = '17.0.0'
firebasePerfVersion = '18.0.1'
fragmentVersion = '1.1.0-beta01'
fragmentVersion = '1.2.0-alpha01'
glideVersion = '4.9.0'
kotlinVersion = '1.3.41'
lifecycleVersion = '2.2.0-alpha01'
lifecycleVersion = '2.2.0-alpha02'
materialVersion = '1.1.0-alpha07'
multidexVersion = '2.0.1'
navigationVersion = '2.1.0-alpha05'
navigationVersion = '2.1.0-alpha06'
okhttpVersion = '3.12.1'
pagingVersion = '2.1.0'
playServicesWearableVersion = '17.0.0'
preferenceVersion = '1.1.0-beta01'
recyclerViewVersion = '1.1.0-alpha06'
preferenceVersion = '1.1.0-rc01'
recyclerViewVersion = '1.1.0-beta01'
roomVersion = '2.1.0'
wearableVersion = '2.4.0'
wearVersion = '1.0.0'
@@ -122,9 +122,7 @@ dependencies {
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
implementation "androidx.preference:preference-ktx:$preferenceVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
@@ -34,7 +34,6 @@ import androidx.appcompat.widget.TooltipCompat
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import androidx.core.os.bundleOf
import androidx.core.view.ViewCompat
import androidx.core.view.children
import androidx.core.view.get
import androidx.core.view.isGone
@@ -252,9 +251,6 @@ class ArtDetailFragment : Fragment(), (Boolean) -> Unit {
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
// Ensure we have the latest insets
ViewCompat.requestApplyInsets(view)

scrimView = view.findViewById(R.id.art_detail_scrim)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
scrimView.background = makeCubicGradientScrimDrawable(Gravity.TOP, 0x44)
@@ -35,7 +35,6 @@ import android.widget.Toast
import androidx.appcompat.widget.Toolbar
import androidx.core.os.bundleOf
import androidx.core.view.GravityCompat
import androidx.core.view.ViewCompat
import androidx.core.view.isGone
import androidx.core.view.isInvisible
import androidx.core.view.isVisible
@@ -94,9 +93,6 @@ class ChooseProviderFragment : Fragment(R.layout.choose_provider_fragment) {
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
// Ensure we have the latest insets
ViewCompat.requestApplyInsets(view)

toolbar = view.findViewById(R.id.toolbar)
requireActivity().menuInflater.inflate(R.menu.choose_provider_fragment,
toolbar.menu)
@@ -28,7 +28,6 @@ import android.widget.ImageView
import androidx.core.animation.doOnEnd
import androidx.core.content.edit
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.ViewCompat
import androidx.fragment.app.Fragment
import androidx.preference.PreferenceManager
import com.google.firebase.analytics.FirebaseAnalytics
@@ -43,8 +42,6 @@ class TutorialFragment : Fragment(R.layout.tutorial_fragment) {
private val runningAnimators = mutableListOf<AnimatorSet>()

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
// Ensure we have the latest insets
ViewCompat.requestApplyInsets(view)
view.findViewById<View>(R.id.tutorial_icon_affordance).setOnClickListener {
FirebaseAnalytics.getInstance(requireContext())
.logEvent(FirebaseAnalytics.Event.TUTORIAL_COMPLETE, null)
@@ -26,7 +26,6 @@ import androidx.appcompat.graphics.drawable.DrawerArrowDrawable
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.core.os.bundleOf
import androidx.core.view.ViewCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.lifecycle.lifecycleScope
@@ -53,9 +52,6 @@ class BrowseProviderFragment: Fragment(R.layout.browse_provider_fragment) {
private val adapter = Adapter()

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
// Ensure we have the latest insets
ViewCompat.requestApplyInsets(view)

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
requireActivity().window.statusBarColor = ContextCompat.getColor(
requireContext(), R.color.theme_primary_dark)
@@ -23,7 +23,6 @@ import android.view.View
import android.widget.Toast
import androidx.appcompat.widget.Toolbar
import androidx.core.content.edit
import androidx.core.view.ViewCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
@@ -125,9 +124,6 @@ class EffectsFragment : Fragment(R.layout.effects_fragment) {
}

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
// Ensure we have the latest insets
ViewCompat.requestApplyInsets(view)

toolbar = view.findViewById(R.id.toolbar)
if (requireActivity() is SettingsActivity) {
toolbar.setNavigationIcon(R.drawable.ic_ab_done)
@@ -25,16 +25,12 @@ import androidx.appcompat.graphics.drawable.DrawerArrowDrawable
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.core.content.edit
import androidx.core.view.ViewCompat
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import net.nurik.roman.muzei.R

class GesturesFragment: Fragment(R.layout.gestures_fragment) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
// Ensure we have the latest insets
ViewCompat.requestApplyInsets(view)

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
requireActivity().window.statusBarColor = ContextCompat.getColor(
requireContext(), R.color.theme_primary_dark)
@@ -34,9 +34,7 @@ dependencies {
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
implementation "androidx.exifinterface:exifinterface:$exifInterfaceVersion"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
implementation "androidx.room:room-ktx:$roomVersion"
implementation "androidx.work:work-runtime-ktx:$workManagerVersion"
kapt "androidx.room:room-compiler:$roomVersion"
@@ -89,7 +89,6 @@ dependencies {
api "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$coroutinesVersion"
implementation "androidx.work:work-runtime-ktx:$workManagerVersion"
implementation "androidx.core:core-ktx:$coreVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion"
implementation "androidx.fragment:fragment-ktx:$fragmentVersion"
implementation "androidx.exifinterface:exifinterface:$exifInterfaceVersion"

0 comments on commit 2ac5650

Please sign in to comment.
You can’t perform that action at this time.