移植wcdb部分代码
This commit is contained in:
@@ -2,7 +2,9 @@ plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-kapt'
|
||||
//apply plugin: 'realm-android'
|
||||
android {
|
||||
namespace 'com.navinfo.vivo'
|
||||
compileSdk 32
|
||||
@@ -15,6 +17,16 @@ android {
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
// 指定room.schemaLocation生成的文件路径
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
|
||||
}
|
||||
}
|
||||
ndk {
|
||||
abiFilters "armeabi", "armeabi-v7a"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
@@ -37,7 +49,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation 'androidx.core:core-ktx:1.8.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
implementation 'com.google.android.material:material:1.7.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
@@ -48,4 +60,18 @@ dependencies {
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
|
||||
|
||||
|
||||
implementation 'com.tencent.wcdb:room:1.1-19' // 代替 room-runtime,同时也不需要再引用 wcdb-android
|
||||
|
||||
api 'androidx.sqlite:sqlite:2.2.0'
|
||||
implementation 'androidx.room:room-runtime:2.4.3'
|
||||
annotationProcessor 'androidx.room:room-compiler:2.4.3'
|
||||
annotationProcessor 'android.arch.persistence.room:compiler:1.1.1'
|
||||
kapt 'android.arch.persistence.room:compiler:1.1.1'// compiler 需要用 room 的
|
||||
kapt 'androidx.room:room-compiler:2.4.3'
|
||||
androidTestImplementation "android.arch.persistence.room:testing:1.1.1"
|
||||
// implementation "android.arch.lifecycle:extensions:1.1.1"
|
||||
// annotationProcessor "android.arch.lifecycle:compiler:1.1.1"
|
||||
implementation 'com.tencent.wcdb:wcdb-android:1.1-19'
|
||||
}
|
||||
Reference in New Issue
Block a user