From b51ec987a01d17b36796daf10399acd8e09ab654 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 24 Mar 2021 20:08:01 +0100 Subject: [PATCH] Updated AndroidX --- app/build.gradle | 12 +++---- .../room/migration/AutoMigrationCallback.java | 36 +++++++++++++++++++ 2 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 app/src/main/java/androidx/room/migration/AutoMigrationCallback.java diff --git a/app/build.gradle b/app/build.gradle index 8722bc4d74..0bc5840643 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -237,9 +237,9 @@ dependencies { def annotation_version = "1.1.0-rc01" def core_version = "1.5.0-beta03" - def appcompat_version = "1.3.0-beta01" - def activity_version = "1.2.1" - def fragment_version = "1.3.1" + def appcompat_version = "1.3.0-rc01" + def activity_version = "1.2.2" + def fragment_version = "1.3.2" def webkit_version = "1.4.0" def recyclerview_version = "1.2.0-beta02" def coordinatorlayout_version = "1.1.0" @@ -249,13 +249,13 @@ dependencies { def lbm_version = "1.0.0" def swiperefresh_version = "1.2.0-alpha01" def documentfile_version = "1.0.1" - def lifecycle_version = "2.3.0" + def lifecycle_version = "2.3.1" def lifecycle_extensions_version = "2.2.0" def sqlite_version = "2.1.0" - def room_version = "2.3.0-beta03" + def room_version = "2.3.0-rc01" def paging_version = "2.1.2" // 3.0.0-alpha11 def preference_version = "1.1.1" - def work_version = "2.5.0" + def work_version = "2.5.0" // 2.6.0-alpha01 def exif_version = "1.3.2" def biometric_version = "1.2.0-alpha03" def billingclient_version = "3.0.3" diff --git a/app/src/main/java/androidx/room/migration/AutoMigrationCallback.java b/app/src/main/java/androidx/room/migration/AutoMigrationCallback.java new file mode 100644 index 0000000000..f1a04f921f --- /dev/null +++ b/app/src/main/java/androidx/room/migration/AutoMigrationCallback.java @@ -0,0 +1,36 @@ +/* + * Copyright 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package androidx.room.migration; +import androidx.annotation.NonNull; +import androidx.annotation.RestrictTo; +import androidx.sqlite.db.SupportSQLiteDatabase; + +/** + * Interface for defining automatic migration strategy for Room databases. + * + * @hide + */ +// TODO: (b/181655460) Complete code usage documentation for this class and the AutoMigration +// annotation. +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) +public interface AutoMigrationCallback { + + /** + * Handles any changes the user may want to implement after migration is completed. + */ + default void onPostMigrate(@NonNull SupportSQLiteDatabase db) {} +}