From cbd9850b57c380d9339eec927fb990d07f00dcfb Mon Sep 17 00:00:00 2001 From: laoyuyu Date: Fri, 13 Jan 2023 17:47:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E8=80=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Aria/build.gradle | 3 +++ Aria/src/main/java/com/arialyy/aria/core/Aria.java | 2 +- .../java/com/arialyy/aria/core/AriaManager.java | 2 +- .../com/arialyy/aria/core/common/RoomProvider.kt | 13 +++++++++++++ .../com/arialyy/aria/core/provider/IdbProvider.kt | 12 ++++++++++++ aria/src/main/AndroidManifest.xml | 1 - 6 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 Aria/src/main/java/com/arialyy/aria/core/common/RoomProvider.kt create mode 100644 Aria/src/main/java/com/arialyy/aria/core/provider/IdbProvider.kt diff --git a/Aria/build.gradle b/Aria/build.gradle index 520e2caa..733cf05b 100644 --- a/Aria/build.gradle +++ b/Aria/build.gradle @@ -1,6 +1,7 @@ plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' + id 'kotlin-kapt' } android { @@ -30,6 +31,8 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') testImplementation(libs.bundles.android.test) implementation(libs.appcompat) + implementation(libs.room.runtime) + kapt libs.room.compiler api project(path: ':AriaAnnotations') api project(path: ':PublicComponent') api project(path: ':HttpComponent') diff --git a/Aria/src/main/java/com/arialyy/aria/core/Aria.java b/Aria/src/main/java/com/arialyy/aria/core/Aria.java index ed27fb18..5071fec2 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/Aria.java +++ b/Aria/src/main/java/com/arialyy/aria/core/Aria.java @@ -72,7 +72,7 @@ import com.arialyy.aria.util.CommonUtil; * * */ -@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) public class Aria { +public class Aria { private Aria() { } diff --git a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java index 37d740b5..7a7e6257 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java +++ b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java @@ -56,7 +56,7 @@ import java.util.concurrent.ConcurrentHashMap; * Created by lyy on 2016/12/1. https://github.com/AriaLyy/Aria * Aria管理器,任务操作在这里执行 */ -@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public class AriaManager { + public class AriaManager { private static final String TAG = "AriaManager"; private static final Object LOCK = new Object(); diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/RoomProvider.kt b/Aria/src/main/java/com/arialyy/aria/core/common/RoomProvider.kt new file mode 100644 index 00000000..de2564d7 --- /dev/null +++ b/Aria/src/main/java/com/arialyy/aria/core/common/RoomProvider.kt @@ -0,0 +1,13 @@ +package com.arialyy.aria.core.common + +import com.arialyy.aria.core.provider.IdbProvider + +/** + * @Author laoyuyu + * @Description + * @Date 5:27 PM 2023/1/13 + **/ +class RoomProvider : IdbProvider { + override fun initDb() { + } +} \ No newline at end of file diff --git a/Aria/src/main/java/com/arialyy/aria/core/provider/IdbProvider.kt b/Aria/src/main/java/com/arialyy/aria/core/provider/IdbProvider.kt new file mode 100644 index 00000000..18d2c80d --- /dev/null +++ b/Aria/src/main/java/com/arialyy/aria/core/provider/IdbProvider.kt @@ -0,0 +1,12 @@ +package com.arialyy.aria.core.provider + +import androidx.room.RoomDatabase + +/** + * @Author laoyuyu + * @Description + * @Date 19:32 PM 2023/1/13 + **/ +interface IdbProvider { + fun initDb() +} \ No newline at end of file diff --git a/aria/src/main/AndroidManifest.xml b/aria/src/main/AndroidManifest.xml index 722c94c4..83e5c3e0 100644 --- a/aria/src/main/AndroidManifest.xml +++ b/aria/src/main/AndroidManifest.xml @@ -3,7 +3,6 @@