数据库提供者

v4
laoyuyu 2 years ago
parent 13fd3e22b6
commit cbd9850b57
  1. 3
      Aria/build.gradle
  2. 2
      Aria/src/main/java/com/arialyy/aria/core/Aria.java
  3. 2
      Aria/src/main/java/com/arialyy/aria/core/AriaManager.java
  4. 13
      Aria/src/main/java/com/arialyy/aria/core/common/RoomProvider.kt
  5. 12
      Aria/src/main/java/com/arialyy/aria/core/provider/IdbProvider.kt
  6. 1
      aria/src/main/AndroidManifest.xml

@ -1,6 +1,7 @@
plugins { plugins {
id 'com.android.library' id 'com.android.library'
id 'org.jetbrains.kotlin.android' id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
} }
android { android {
@ -30,6 +31,8 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation(libs.bundles.android.test) testImplementation(libs.bundles.android.test)
implementation(libs.appcompat) implementation(libs.appcompat)
implementation(libs.room.runtime)
kapt libs.room.compiler
api project(path: ':AriaAnnotations') api project(path: ':AriaAnnotations')
api project(path: ':PublicComponent') api project(path: ':PublicComponent')
api project(path: ':HttpComponent') api project(path: ':HttpComponent')

@ -72,7 +72,7 @@ import com.arialyy.aria.util.CommonUtil;
* *
* </pre> * </pre>
*/ */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) public class Aria { public class Aria {
private Aria() { private Aria() {
} }

@ -56,7 +56,7 @@ import java.util.concurrent.ConcurrentHashMap;
* Created by lyy on 2016/12/1. https://github.com/AriaLyy/Aria * Created by lyy on 2016/12/1. https://github.com/AriaLyy/Aria
* Aria管理器任务操作在这里执行 * Aria管理器任务操作在这里执行
*/ */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public class AriaManager { public class AriaManager {
private static final String TAG = "AriaManager"; private static final String TAG = "AriaManager";
private static final Object LOCK = new Object(); private static final Object LOCK = new Object();

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

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

@ -3,7 +3,6 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application <application
android:allowBackup="true"
android:supportsRtl="true"> android:supportsRtl="true">
</application> </application>

Loading…
Cancel
Save