Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation Migration #107

Merged
merged 108 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
ee2f6d7
Sort modules.
thomaskioko Nov 25, 2023
cf20f7c
Add navigation module
thomaskioko Nov 25, 2023
8225574
Reorganize dependencies.
thomaskioko Nov 27, 2023
4de4830
Delete android navigation module.
thomaskioko Nov 27, 2023
5e4db23
Movie interface to util module.
thomaskioko Nov 27, 2023
0e088d5
Update imports
thomaskioko Nov 27, 2023
2df78bf
Delete home module
thomaskioko Nov 27, 2023
b4abb37
Delete worker module. (Will be implemented later)
thomaskioko Nov 27, 2023
b36162e
Cleanup plugins.
thomaskioko Nov 27, 2023
87dcfb1
Move class to core-util module.
thomaskioko Nov 27, 2023
43e4f22
Add voyager screen implementation.
thomaskioko Nov 27, 2023
70b4d29
Minor cleanup: Rename class.
thomaskioko Nov 27, 2023
00a23bc
Delete worker module.
thomaskioko Nov 27, 2023
5f3473f
Remove worker implementation.
thomaskioko Nov 27, 2023
5348461
Add core voyager implementation.
thomaskioko Nov 27, 2023
ee2e9ce
Minor cleanup: Rename class.
thomaskioko Nov 27, 2023
bf573a7
Add voyager navigation implementation.
thomaskioko Nov 27, 2023
eae58ac
Remove compose navigation dependencies. 👀
thomaskioko Nov 27, 2023
2c75855
Add voyager dependencies. 🥳
thomaskioko Nov 27, 2023
ad23863
Delete Android ViewModel implementation.
thomaskioko Nov 27, 2023
6a1c5aa
Rename watchlist module to library.
thomaskioko Nov 27, 2023
8f3346e
Minor cleanup: Rename leftover watchlist references to library.
thomaskioko Nov 27, 2023
ae06883
Rename screen.
thomaskioko Nov 28, 2023
693c8bb
Create voyager util module.
thomaskioko Nov 28, 2023
59abfda
Move classes to voyagerUtil module.
thomaskioko Nov 28, 2023
512ce87
Minor cleanup: Rename class, add missing components.
thomaskioko Nov 28, 2023
418a59a
Add screenModel implementation to discover module.
thomaskioko Nov 28, 2023
80c1aa9
Add screenModel implementation to library module.
thomaskioko Nov 28, 2023
d0e19d4
Minor cleanup.
thomaskioko Nov 28, 2023
6a810fc
Minor cleanup on library module.
thomaskioko Nov 28, 2023
9f0a84a
Add screenModel implementation to profile module
thomaskioko Nov 28, 2023
0812138
Add screenModel implementation to settings module
thomaskioko Nov 28, 2023
6ecaa72
Add discoverScreenModel test.
thomaskioko Nov 28, 2023
7bca30b
Tooling cleanup.
thomaskioko Nov 29, 2023
d3bcb11
Add required dependencies.
thomaskioko Nov 29, 2023
916fbbf
Minor cleanup.
thomaskioko Nov 29, 2023
4b04830
Add screenModel implementation show-details module.
thomaskioko Nov 29, 2023
db480d2
Delete flowredux dependency
thomaskioko Nov 29, 2023
12befa4
Rename module.
thomaskioko Nov 29, 2023
b9236b9
Update tests
thomaskioko Nov 29, 2023
f85e5e7
Add screenModel implementation to season-details and trailers modules.
thomaskioko Nov 29, 2023
7ce9e2c
Minor cleanup: Remember pager position. Fix background color on scroll.
thomaskioko Nov 29, 2023
85fb663
Add unitTest bundle.
thomaskioko Nov 29, 2023
8ae1091
Delete stateMachine wrapper classes.
thomaskioko Nov 29, 2023
47d742d
Minor cleanup.
thomaskioko Nov 29, 2023
f46e27d
Make lint happy
thomaskioko Nov 29, 2023
e57a00e
Add Voyager dependency to README.
thomaskioko Nov 29, 2023
86baa90
Update gradle-wrapper
thomaskioko Nov 29, 2023
e32dd16
Bump up dependency versions.
thomaskioko Nov 29, 2023
9ace80f
Move class to common module.
thomaskioko Nov 29, 2023
161324c
Add packaging options.
thomaskioko Nov 29, 2023
d8a39b0
Cleanup gradle files.
thomaskioko Nov 29, 2023
a891bac
Minor cleanup.
thomaskioko Nov 30, 2023
9b73e3c
Add compose runtime dependencies. Fixes iOS build failure.
thomaskioko Nov 30, 2023
e960cf0
Rename feature directory. Remove android prefix.
thomaskioko Nov 30, 2023
9c57061
Remove voyager add navigation module.
thomaskioko Dec 2, 2023
c5c476d
Migrate trailers presentation module to decompose
thomaskioko Dec 2, 2023
172dfac
Migrate showDetails presentation module to decompose
thomaskioko Dec 2, 2023
6797729
Migrate settings presentation module to decompose
thomaskioko Dec 2, 2023
02a0b0d
Migrate seasonDetails presentation module to decompose
thomaskioko Dec 2, 2023
0675247
Create search presentation module.
thomaskioko Dec 2, 2023
80c6c4e
Migrate profile presentation module to decompose
thomaskioko Dec 2, 2023
4bd826b
Create more-shows presentation module.
thomaskioko Dec 2, 2023
38af3c9
Migrate library presentation module to decompose
thomaskioko Dec 2, 2023
7d57d57
Migrate discover presentation module to decompose
thomaskioko Dec 2, 2023
f584ad6
Use immutable list
thomaskioko Dec 2, 2023
60ad20c
Create root decompose navigation module. 🥳
thomaskioko Dec 2, 2023
48d1dc0
Minor cleanup: Use component activity.
thomaskioko Dec 2, 2023
d376b67
Add logging component
thomaskioko Dec 2, 2023
84aa92f
Decompose feature modules. 🥳 Get rid of FeatureRegistry and cleanup d…
thomaskioko Dec 2, 2023
6d2e6e8
Delete voyager module and remaining classes.
thomaskioko Dec 2, 2023
53f62f6
Cleanup modules and dependencies.
thomaskioko Dec 2, 2023
28758e5
Update import.
thomaskioko Dec 2, 2023
06a0242
Add root navigation component.
thomaskioko Dec 2, 2023
13262f5
Add decompose dependencies and remove unused ones.
thomaskioko Dec 2, 2023
97575a8
Delete feature plugin.
thomaskioko Dec 2, 2023
43f78c3
Update README with decompose dependency.
thomaskioko Dec 2, 2023
ec96967
Remove viewModel and load theme from root presenter.
thomaskioko Dec 2, 2023
fdc1fab
Add Napier for logging. (Trial)
thomaskioko Dec 2, 2023
767906c
Some dependency cleanup: Create SharedComponent
thomaskioko Dec 2, 2023
3dd3a57
Enable ksp companion extension
thomaskioko Dec 2, 2023
df5221d
Borrow some extension goodies from tivi.
thomaskioko Dec 3, 2023
c004429
Make spotless happy
thomaskioko Dec 3, 2023
cd68fdf
Add platform component and fix scoping issue when building iOS framew…
thomaskioko Dec 3, 2023
49b95f9
Add decompose util class from Confetti
thomaskioko Dec 3, 2023
b57c3fb
Add decompose extension dependencies.
thomaskioko Dec 3, 2023
31de0f4
Replace StateFlow with Value and use helper function.
thomaskioko Dec 3, 2023
600d117
Replace collectAsState with decompose subscribeAsState
thomaskioko Dec 3, 2023
f151395
Delete viewModel implementation.
thomaskioko Dec 4, 2023
fd37d06
Minor cleanup: update state and actions.
thomaskioko Dec 5, 2023
75ab4c9
Remove internal keyword. Make it accessible to iOS project.
thomaskioko Dec 5, 2023
51bb9b2
Move framework setup to shared gradle file
thomaskioko Dec 5, 2023
1c5f7c0
Add util dependency
thomaskioko Dec 5, 2023
3cc0bdc
Remove turbine block.
thomaskioko Dec 6, 2023
76299d9
Minor cleanup. Rename theme enum. Fixes conflicts on iOS.
thomaskioko Dec 6, 2023
41fa569
Setup Decompose core navigation on ios 🥳
thomaskioko Dec 6, 2023
8ba30ec
Minor cleanup: Fix wierd naming issue on iOS
thomaskioko Dec 7, 2023
010ad88
Move font our of UI directory
thomaskioko Dec 8, 2023
340a264
Update extensions directory.
thomaskioko Dec 8, 2023
4a6402c
Update ui components directory.
thomaskioko Dec 9, 2023
1af4954
Minor UI improvements and update structure.
thomaskioko Dec 9, 2023
bd928ae
Minor UI tweaks.
thomaskioko Dec 9, 2023
397c82b
Add Library Ui implementation.
thomaskioko Dec 9, 2023
e0bab38
Bump up dependency versions.
thomaskioko Dec 9, 2023
4339f79
Update project configuration.
thomaskioko Dec 9, 2023
965a44f
Merge pull request #109 from thomaskioko/feature/decompose-ios
thomaskioko Dec 9, 2023
e8a35d5
Merge pull request #108 from thomaskioko/feature/navigation-rework-de…
thomaskioko Dec 9, 2023
3c2a18c
Update app demos and dependencies used.
thomaskioko Dec 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ This is my playground for learning Kotlin Multiplatform. With that said, I'm sur

| Android | iOS |
| -- | -- |
| <video src="https://user-images.githubusercontent.com/841885/223576880-c7391d14-63b8-47cd-a7f9-97aee5e47892.mp4" width=350/> | <video src="https://github.com/c0de-wizard/tv-maniac/assets/841885/c26f3857-9b4e-409d-9bfb-6be32cd5111b" width=350/> |

| <video src="https://github.com/c0de-wizard/tv-maniac/assets/841885/7ad4abd7-bba1-4afa-9e0a-61023269e868" width=350/> | <video src="https://github.com/thomaskioko/tv-maniac/assets/841885/a28f0cde-b5a6-42f0-ab56-80e4a2877a15" width=350/> |

## 🖥 Project Setup & Environment

Expand Down Expand Up @@ -113,26 +112,23 @@ traktRedirectUri: "PUT_CALLBACK_URI_HERE"
* [Compose Lints](https://slackhq.github.io/compose-lints/) - Custom lint checks for Jetpack Compose.
* [Jetpack Compose](https://developer.android.com/jetpack/compose)
* [Coil](https://coil-kt.github.io/coil/compose/) - Image loading
* [Navigation](https://developer.android.com/jetpack/compose/navigation) - Navigation
* [KenBurnsView](https://github.com/flavioarfaria/KenBurnsView) - Immersive image.
* [Leakcanary](https://github.com/square/leakcanary) - Memory leak detection.
* [ViewModel](https://developer.android.com/topic/libraries/architecture/viewmodel) UI-related data holder, lifecycle
aware.
* [WorkManager](https://developer.android.com/topic/libraries/architecture/workmanager?gclsrc=ds&gclsrc=ds) Handle persistent work

### Kmp - Common
* [Kotlinx Serialization](https://ktor.io/docs/kotlin-serialization.html) - De/Serializing JSON
* [Coroutines](https://github.com/Kotlin/kotlinx.coroutines#multiplatform) - Concurrency & Threading
* [DataStore Preferences](https://android-developers.googleblog.com/2022/10/announcing-experimental-preview-of-jetpack-multiplatform-libraries.html) - Data storage
* [DateTime](https://github.com/Kotlin/kotlinx-datetime) - Date & Time
* [Flow-Redux](https://github.com/freeletics/FlowRedux)
* [Decompose](https://arkivanov.github.io/Decompose/) - Kotlin Multiplatform library for breaking down your code into lifecycle-aware business logic components (aka BLoC).
* [Kermit](https://kermit.touchlab.co/) - Logging
* [kotlin-inject](https://github.com/evant/kotlin-inject) - Injection library.
* [Kotlinx Serialization](https://ktor.io/docs/kotlin-serialization.html) - De/Serializing JSON
* [Ktor](https://ktor.io/) - Networking
* [Kotest Assertions](https://kotest.io/docs/assertions/assertions.html) - Testing
* [SQLDelight](https://github.com/cashapp/sqldelight/) - Local storage
- [Coroutines Extensions](https://cashapp.github.io/sqldelight/js_sqlite/coroutines/) Consume queries as Flow


### iOS
* [Kingfisher](https://github.com/onevcat/Kingfisher) - Image library.
* [OAuthSwift](https://github.com/OAuthSwift/OAuthSwift) Swift-based OAuth library for iOS and macOS.
Expand Down
5 changes: 3 additions & 2 deletions android-core/designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("tvmaniac.compose.library")
id("plugin.tvmaniac.compose.library")
}

android {
Expand All @@ -17,8 +17,9 @@ dependencies {

implementation(projects.androidCore.resources)

implementation(libs.kenburns)
implementation(libs.androidx.core)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.material.icons)
implementation(libs.kenburns)
implementation(libs.kotlinx.collections)
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.thomaskioko.tvmaniac.compose.extensions.copy
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf

@Composable
fun <T> LazyGridItems(
listState: LazyListState,
paddingValues: PaddingValues,
modifier: Modifier = Modifier,
items: List<T> = listOf(),
items: ImmutableList<T> = persistentListOf(),
rows: Int = 3,
hPadding: Int = 8,
hPadding: Int = 0,
itemContent: @Composable (LazyItemScope.(T) -> Unit),
) {
val chunkedList = items.chunked(rows)
LazyColumn(
state = listState,
contentPadding = paddingValues.copy(copyTop = false),
contentPadding = paddingValues,
modifier = modifier
.padding(horizontal = hPadding.dp),
verticalArrangement = Arrangement.spacedBy(4.dp),
Expand Down
23 changes: 0 additions & 23 deletions android-core/navigation/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 2 additions & 1 deletion android-core/resources/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<string name="menu_item_discover">Discover</string>
<string name="menu_item_search">Search</string>
<string name="menu_item_follow">Following</string>
<string name="menu_item_library">Library</string>
<string name="menu_item_settings">Settings</string>
<string name="menu_item_profile">Profile</string>

Expand All @@ -28,7 +29,7 @@
<string name="tab_episodes">Episodes</string>
<string name="tab_casts">Casts</string>

<string name="msg_empty_favorites">You haven\'t added any favorites.</string>
<string name="error_empty_library">Looks like your library is empty</string>
<string name="empty_list">Could\'nt load seasons.</string>
<string name="msg_empty_category">Could not load show category data!</string>
<string name="msg_search_show_hint">Search TV Shows</string>
Expand Down
21 changes: 0 additions & 21 deletions android-core/workmanager/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading