Commit caa9df86 authored by topjohnwu's avatar topjohnwu

Switch to R8 friendly room-runtime

parent f417389a
......@@ -90,6 +90,14 @@ dependencies {
implementation "se.ansman.kotshi:api:${vKotshi}"
kapt "se.ansman.kotshi:compiler:${vKotshi}"
modules {
module('androidx.room:room-runtime') {
replacedBy('com.github.topjohnwu:room-runtime')
}
}
def vRoom = "2.1.0-rc01"
implementation "com.github.topjohnwu:room-runtime:${vRoom}"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.preference:preference:1.0.0'
......
......@@ -10,6 +10,9 @@ import android.os.Build
import android.os.Bundle
import androidx.appcompat.app.AppCompatDelegate
import androidx.multidex.MultiDex
import androidx.room.Room
import androidx.work.impl.WorkDatabase
import androidx.work.impl.WorkDatabase_Impl
import com.topjohnwu.magisk.di.koinModules
import com.topjohnwu.magisk.utils.LocaleManager
import com.topjohnwu.magisk.utils.RootUtils
......@@ -107,6 +110,12 @@ open class App : Application(), Application.ActivityLifecycleCallbacks {
Shell.Config.addInitializers(RootUtils::class.java)
Shell.Config.setTimeout(2)
THREAD_POOL = AsyncTask.THREAD_POOL_EXECUTOR as ThreadPoolExecutor
Room.setFactory {
when (it) {
WorkDatabase::class.java -> WorkDatabase_Impl()
else -> null
}
}
}
@Deprecated("")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment