fix(android): use SoLoader to load libraries

This commit is contained in:
Harsh Shandilya 2023-06-10 00:04:10 +05:30
parent d397680d33
commit 22d1755fd2
No known key found for this signature in database
4 changed files with 6 additions and 1 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
* Comments and user profile text rendering was overhauled, there should be no visual changes
* Added another workaround for native library loading crash
## [1.29.0] - 2023-06-08

View file

@ -76,6 +76,7 @@ dependencies {
implementation(libs.kotlinx.collections.immutable)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.napier)
implementation(libs.soloader)
implementation(libs.sqldelight.extensions.coroutines)
implementation(projects.api)
implementation(projects.common)

View file

@ -1,5 +1,5 @@
/*
* Copyright © 2021-2022 Harsh Shandilya.
* Copyright © 2021-2023 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@ -15,6 +15,7 @@ import androidx.work.WorkManager
import com.deliveryhero.whetstone.Whetstone
import com.deliveryhero.whetstone.app.ApplicationComponentOwner
import com.deliveryhero.whetstone.app.ContributesAppInjector
import com.facebook.soloader.SoLoader
import dev.msfjarvis.claw.android.work.SavedPostUpdaterWorker
import dev.msfjarvis.claw.core.injection.AppPlugin
import java.util.concurrent.TimeUnit
@ -31,6 +32,7 @@ class ClawApplication : Application(), ApplicationComponentOwner {
override fun onCreate() {
Whetstone.inject(this)
super.onCreate()
SoLoader.init(this, false)
plugins.forEach { plugin -> plugin.apply(this) }
val postUpdateWorkRequest =
PeriodicWorkRequestBuilder<SavedPostUpdaterWorker>(POST_REFRESH_PERIOD, TimeUnit.HOURS)

View file

@ -81,6 +81,7 @@ retrofit-kotlinxSerializationConverter = "com.jakewharton.retrofit:retrofit2-kot
sentry-bom = { module = "io.sentry:sentry-bom", version.ref = "sentry-sdk" }
sentry-okhttp = { module = "io.sentry:sentry-android-okhttp", version.ref = "sentry-sdk" }
slack-compose-lints = "com.slack.lint.compose:compose-lint-checks:1.2.0"
soloader = "com.facebook.soloader:soloader:0.10.5"
sqldelight-androidDriver = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" }
sqldelight-extensions-coroutines = { module = "app.cash.sqldelight:coroutines-extensions-jvm", version.ref = "sqldelight" }
sqldelight-jvmDriver = { module = "app.cash.sqldelight:sqlite-driver", version.ref = "sqldelight" }