Skip to content

Commit cadf6e6

Browse files
committed
Migrate to compose multiplatform
1 parent bf42793 commit cadf6e6

282 files changed

Lines changed: 10839 additions & 1864 deletions

File tree

Some content is hidden

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

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
/android/release
66
/common/build
77
/desktop/build
8+
/desktopApp/build
9+
/composeApp/build
810
/cli/build
11+
/websiteBuilder/html
12+
/websiteBuilder/build
913
.idea/
1014
.gradle/
1115
local.properties
@@ -14,6 +18,7 @@ local.properties
1418
*.jar
1519
/html
1620
.claude
21+
.kotlin
1722
processed.txt
1823
instructions-tldr.md
1924
instructions-man.md

.run/desktop.run.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="desktop" type="GradleRunConfiguration" factoryName="Gradle">
3+
<ExternalSystemSettings>
4+
<option name="executionName" />
5+
<option name="externalProjectPath" value="$PROJECT_DIR$/desktopApp" />
6+
<option name="externalSystemIdString" value="GRADLE" />
7+
<option name="scriptParameters" value="" />
8+
<option name="taskDescriptions">
9+
<list />
10+
</option>
11+
<option name="taskNames">
12+
<list>
13+
<option value="run" />
14+
</list>
15+
</option>
16+
<option name="vmOptions" />
17+
</ExternalSystemSettings>
18+
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
19+
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
20+
<DebugAllEnabled>false</DebugAllEnabled>
21+
<RunAsTest>false</RunAsTest>
22+
<method v="2" />
23+
</configuration>
24+
</component>

android/build.gradle.kts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,15 @@ group = "com.inspiredandroid.linuxcommandbibliotheca"
88

99
dependencies {
1010
implementation(project(":common"))
11+
implementation(project(":composeApp"))
1112
implementation(libs.androidx.activity.compose)
12-
implementation(libs.androidx.material)
13-
implementation(libs.androidx.navigation.compose)
1413
implementation(libs.accompanist.appcompat.theme)
1514
implementation(libs.accompanist.systemuicontroller)
16-
implementation(libs.androidx.lifecycle.viewmodel.compose)
17-
implementation(libs.androidx.preference)
18-
implementation(libs.androidx.ui.tooling.preview)
19-
implementation(libs.androidx.material.icons.core)
15+
implementation(libs.androidx.material)
2016

2117
implementation(libs.koin.core)
2218
implementation(libs.koin.android)
2319
implementation(libs.koin.androidx.compose)
24-
implementation(libs.androidx.foundation)
25-
implementation(libs.kotlinx.collections.immutable)
2620

2721
androidTestImplementation(libs.androidx.ui.test.junit4)
2822
debugImplementation(libs.androidx.ui.test.manifest)
-17.2 MB
Binary file not shown.

android/src/main/java/com/inspiredandroid/linuxcommandbibliotheca/ExtensionFunctions.kt

Lines changed: 0 additions & 8 deletions
This file was deleted.

android/src/main/java/com/inspiredandroid/linuxcommandbibliotheca/IconResources.kt

Lines changed: 0 additions & 153 deletions
This file was deleted.
Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
package com.inspiredandroid.linuxcommandbibliotheca
22

33
import android.app.Application
4-
import com.inspiredandroid.linuxcommandbibliotheca.data.BasicsRepository
5-
import com.inspiredandroid.linuxcommandbibliotheca.data.CommandsRepository
6-
import com.inspiredandroid.linuxcommandbibliotheca.data.TipsRepository
7-
import com.inspiredandroid.linuxcommandbibliotheca.ui.screens.basiccategories.BasicCategoriesViewModel
8-
import com.inspiredandroid.linuxcommandbibliotheca.ui.screens.basicgroups.BasicGroupsViewModel
9-
import com.inspiredandroid.linuxcommandbibliotheca.ui.screens.commanddetail.CommandDetailViewModel
10-
import com.inspiredandroid.linuxcommandbibliotheca.ui.screens.commandlist.CommandListViewModel
11-
import com.inspiredandroid.linuxcommandbibliotheca.ui.screens.search.SearchViewModel
12-
import com.inspiredandroid.linuxcommandbibliotheca.ui.screens.tips.TipsViewModel
4+
import com.linuxcommandlibrary.app.di.commonModule
5+
import com.linuxcommandlibrary.app.di.platformModule
136
import org.koin.android.ext.koin.androidContext
147
import org.koin.android.ext.koin.androidLogger
158
import org.koin.core.context.GlobalContext.startKoin
16-
import org.koin.core.module.dsl.*
17-
import org.koin.dsl.module
189

1910
class LinuxApplication : Application() {
2011

@@ -24,21 +15,7 @@ class LinuxApplication : Application() {
2415
startKoin {
2516
androidLogger()
2617
androidContext(this@LinuxApplication)
27-
modules(appModule)
18+
modules(commonModule, platformModule())
2819
}
2920
}
30-
31-
private val appModule = module {
32-
single { DataManager(androidContext()) }
33-
single { BasicsRepository(androidContext()) }
34-
single { CommandsRepository(androidContext()) }
35-
single { TipsRepository(androidContext()) }
36-
37-
viewModel { (categoryId: String) -> BasicGroupsViewModel(categoryId, get()) }
38-
viewModel { BasicCategoriesViewModel(get()) }
39-
viewModel { (commandName: String) -> CommandDetailViewModel(commandName, get(), get()) }
40-
viewModel { TipsViewModel(get()) }
41-
viewModel { CommandListViewModel(get(), get()) }
42-
viewModel { SearchViewModel(get()) }
43-
}
4421
}

0 commit comments

Comments
 (0)