Skip to content

Commit 999a89e

Browse files
authored
Merge pull request #9968 from wmontwe/feat-core-file-manager
feat: add core file manager
2 parents 1896c4e + 64ca95c commit 999a89e

File tree

44 files changed

+899
-139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+899
-139
lines changed

app-common/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ dependencies {
3131
implementation(projects.core.configstore.implBackend)
3232

3333
implementation(projects.core.featureflag)
34+
implementation(projects.core.file)
3435

3536
implementation(projects.core.ui.setting.api)
3637
implementation(projects.core.ui.setting.implDialog)

app-common/src/main/kotlin/net/thunderbird/app/common/core/AppCommonCoreModule.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
package net.thunderbird.app.common.core
22

3+
import android.content.Context
34
import net.thunderbird.app.common.core.configstore.appCommonCoreConfigStoreModule
45
import net.thunderbird.app.common.core.logging.appCommonCoreLogger
56
import net.thunderbird.app.common.core.ui.appCommonCoreUiModule
7+
import net.thunderbird.core.file.AndroidFileSystemManager
8+
import net.thunderbird.core.file.DefaultFileManager
9+
import net.thunderbird.core.file.FileManager
10+
import net.thunderbird.core.file.FileSystemManager
611
import org.koin.core.module.Module
712
import org.koin.dsl.module
813

@@ -12,4 +17,16 @@ val appCommonCoreModule: Module = module {
1217
appCommonCoreLogger,
1318
appCommonCoreUiModule,
1419
)
20+
21+
single<FileSystemManager> {
22+
AndroidFileSystemManager(
23+
contentResolver = get<Context>().contentResolver,
24+
)
25+
}
26+
27+
single<FileManager> {
28+
DefaultFileManager(
29+
fileSystemManager = get(),
30+
)
31+
}
1532
}

app-common/src/main/kotlin/net/thunderbird/app/common/core/logging/LoggerModule.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import net.thunderbird.core.logging.LogSink
1313
import net.thunderbird.core.logging.Logger
1414
import net.thunderbird.core.logging.composite.CompositeLogSink
1515
import net.thunderbird.core.logging.console.ConsoleLogSink
16-
import net.thunderbird.core.logging.file.AndroidFileSystemManager
1716
import net.thunderbird.core.logging.file.FileLogSink
1817
import org.koin.core.qualifier.named
1918
import org.koin.dsl.bind
@@ -64,7 +63,7 @@ val appCommonCoreLogger = module {
6463
level = LogLevel.DEBUG,
6564
fileName = "thunderbird-sync-debug",
6665
fileLocation = get<Context>().filesDir.path,
67-
fileSystemManager = AndroidFileSystemManager(get<Context>().contentResolver),
66+
fileManager = get(),
6867
)
6968
}
7069

app-k9mail/dependencies/fossReleaseRuntimeClasspath.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ co.touchlab:stately-concurrent-collections:2.1.0
172172
co.touchlab:stately-strict-jvm:2.1.0
173173
co.touchlab:stately-strict:2.1.0
174174
com.beetstra.jutf7:jutf7:1.0.0
175+
com.eygraber:uri-kmp-android:0.0.21
176+
com.eygraber:uri-kmp:0.0.21
175177
com.github.ByteHamster:SearchPreference:2.7.3
176178
com.github.bumptech.glide:annotations:4.16.0
177179
com.github.bumptech.glide:disklrucache:4.16.0

app-k9mail/dependencies/fullReleaseRuntimeClasspath.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ co.touchlab:stately-strict:2.1.0
174174
com.android.billingclient:billing-ktx:7.1.1
175175
com.android.billingclient:billing:7.1.1
176176
com.beetstra.jutf7:jutf7:1.0.0
177+
com.eygraber:uri-kmp-android:0.0.21
178+
com.eygraber:uri-kmp:0.0.21
177179
com.github.ByteHamster:SearchPreference:2.7.3
178180
com.github.bumptech.glide:annotations:4.16.0
179181
com.github.bumptech.glide:disklrucache:4.16.0

app-thunderbird/dependencies/fossBetaRuntimeClasspath.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ co.touchlab:stately-concurrent-collections:2.1.0
177177
co.touchlab:stately-strict-jvm:2.1.0
178178
co.touchlab:stately-strict:2.1.0
179179
com.beetstra.jutf7:jutf7:1.0.0
180+
com.eygraber:uri-kmp-android:0.0.21
181+
com.eygraber:uri-kmp:0.0.21
180182
com.github.ByteHamster:SearchPreference:2.7.3
181183
com.github.bumptech.glide:annotations:4.16.0
182184
com.github.bumptech.glide:disklrucache:4.16.0

app-thunderbird/dependencies/fossDailyRuntimeClasspath.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ co.touchlab:stately-concurrent-collections:2.1.0
177177
co.touchlab:stately-strict-jvm:2.1.0
178178
co.touchlab:stately-strict:2.1.0
179179
com.beetstra.jutf7:jutf7:1.0.0
180+
com.eygraber:uri-kmp-android:0.0.21
181+
com.eygraber:uri-kmp:0.0.21
180182
com.github.ByteHamster:SearchPreference:2.7.3
181183
com.github.bumptech.glide:annotations:4.16.0
182184
com.github.bumptech.glide:disklrucache:4.16.0

app-thunderbird/dependencies/fossReleaseRuntimeClasspath.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ co.touchlab:stately-concurrent-collections:2.1.0
177177
co.touchlab:stately-strict-jvm:2.1.0
178178
co.touchlab:stately-strict:2.1.0
179179
com.beetstra.jutf7:jutf7:1.0.0
180+
com.eygraber:uri-kmp-android:0.0.21
181+
com.eygraber:uri-kmp:0.0.21
180182
com.github.ByteHamster:SearchPreference:2.7.3
181183
com.github.bumptech.glide:annotations:4.16.0
182184
com.github.bumptech.glide:disklrucache:4.16.0

app-thunderbird/dependencies/fullBetaRuntimeClasspath.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ co.touchlab:stately-strict:2.1.0
179179
com.android.billingclient:billing-ktx:7.1.1
180180
com.android.billingclient:billing:7.1.1
181181
com.beetstra.jutf7:jutf7:1.0.0
182+
com.eygraber:uri-kmp-android:0.0.21
183+
com.eygraber:uri-kmp:0.0.21
182184
com.github.ByteHamster:SearchPreference:2.7.3
183185
com.github.bumptech.glide:annotations:4.16.0
184186
com.github.bumptech.glide:disklrucache:4.16.0

app-thunderbird/dependencies/fullDailyRuntimeClasspath.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ co.touchlab:stately-strict:2.1.0
179179
com.android.billingclient:billing-ktx:7.1.1
180180
com.android.billingclient:billing:7.1.1
181181
com.beetstra.jutf7:jutf7:1.0.0
182+
com.eygraber:uri-kmp-android:0.0.21
183+
com.eygraber:uri-kmp:0.0.21
182184
com.github.ByteHamster:SearchPreference:2.7.3
183185
com.github.bumptech.glide:annotations:4.16.0
184186
com.github.bumptech.glide:disklrucache:4.16.0

0 commit comments

Comments
 (0)