-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbe7a15
commit 4ee8ec9
Showing
28 changed files
with
211 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
androidApp/src/main/kotlin/org/michaelbel/sandbox/JavaSandbox.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es/navigation/ktx/NavHostControllerKtx.kt → ...es/navigation/ktx/NavHostControllerKtx.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 2 additions & 13 deletions
15
feature/auth/src/androidMain/kotlin/org/michaelbel/movies/auth/AuthNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
feature/auth/src/androidMain/kotlin/org/michaelbel/movies/auth/Settings.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package org.michaelbel.movies.auth | ||
|
||
internal actual const val USE_PLATFORM_DEFAULT_WIDTH: Boolean = false |
3 changes: 3 additions & 0 deletions
3
feature/auth/src/commonMain/kotlin/org/michaelbel/movies/auth/Settings.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package org.michaelbel.movies.auth | ||
|
||
internal expect val USE_PLATFORM_DEFAULT_WIDTH: Boolean |
26 changes: 26 additions & 0 deletions
26
feature/auth/src/commonMain/kotlin/org/michaelbel/movies/auth/ktx/AuthNavigationKtx.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.michaelbel.movies.auth.ktx | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.window.DialogProperties | ||
import androidx.navigation.NavBackStackEntry | ||
import androidx.navigation.NavController | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.dialog | ||
import org.michaelbel.movies.auth.AuthDestination | ||
import org.michaelbel.movies.auth.USE_PLATFORM_DEFAULT_WIDTH | ||
|
||
fun NavController.navigateToAuth() { | ||
navigate(AuthDestination.route) | ||
} | ||
|
||
internal fun NavGraphBuilder.authGraphInternal( | ||
content: @Composable (NavBackStackEntry) -> Unit | ||
) { | ||
dialog( | ||
route = AuthDestination.route, | ||
dialogProperties = DialogProperties( | ||
usePlatformDefaultWidth = USE_PLATFORM_DEFAULT_WIDTH | ||
), | ||
content = content | ||
) | ||
} |
5 changes: 0 additions & 5 deletions
5
feature/auth/src/desktopMain/kotlin/org/michaelbel/movies/auth/AuthNavigation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
feature/auth/src/desktopMain/kotlin/org/michaelbel/movies/auth/Settings.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package org.michaelbel.movies.auth | ||
|
||
internal actual const val USE_PLATFORM_DEFAULT_WIDTH: Boolean = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
plugins { | ||
alias(libs.plugins.kotlin.multiplatform) | ||
alias(libs.plugins.compose) | ||
alias(libs.plugins.android.library) | ||
} | ||
|
||
kotlin { | ||
androidTarget { | ||
compilations.all { | ||
kotlinOptions { | ||
jvmTarget = rootProject.extra.get("jvmTarget") as String | ||
} | ||
} | ||
} | ||
jvm("desktop") | ||
|
||
sourceSets { | ||
commonMain.dependencies { | ||
api(project(":feature:account")) | ||
api(project(":feature:auth")) | ||
api(project(":feature:details")) | ||
api(project(":feature:feed")) | ||
api(project(":feature:gallery")) | ||
api(project(":feature:search")) | ||
api(project(":feature:settings")) | ||
} | ||
androidMain.dependencies { | ||
api(project(":feature:debug")) | ||
} | ||
val desktopMain by getting | ||
desktopMain.dependencies { | ||
implementation(project(":core:platform-services:inject-desktop")) | ||
implementation(libs.koin.compose) | ||
} | ||
} | ||
} | ||
|
||
android { | ||
namespace = "org.michaelbel.movies.main_impl" | ||
flavorDimensions += "version" | ||
|
||
defaultConfig { | ||
minSdk = libs.versions.min.sdk.get().toInt() | ||
compileSdk = libs.versions.compile.sdk.get().toInt() | ||
} | ||
|
||
productFlavors { | ||
create("gms") { | ||
dimension = "version" | ||
isDefault = true | ||
} | ||
create("hms") { | ||
dimension = "version" | ||
} | ||
create("foss") { | ||
dimension = "version" | ||
} | ||
} | ||
|
||
buildFeatures { | ||
buildConfig = true | ||
compose = true | ||
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = libs.versions.androidx.compose.compiler.get() | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.toVersion(rootProject.extra.get("jvmTarget") as String) | ||
targetCompatibility = JavaVersion.toVersion(rootProject.extra.get("jvmTarget") as String) | ||
} | ||
|
||
lint { | ||
quiet = true | ||
abortOnError = false | ||
ignoreWarnings = true | ||
checkDependencies = true | ||
lintConfig = file("${project.rootDir}/config/codestyle/lint.xml") | ||
} | ||
|
||
val gmsImplementation by configurations | ||
val hmsImplementation by configurations | ||
val fossImplementation by configurations | ||
dependencies { | ||
gmsImplementation(project(":core:platform-services:inject-android")) | ||
hmsImplementation(project(":core:platform-services:inject-android")) | ||
fossImplementation(project(":core:platform-services:inject-android")) | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
feature/main-impl/src/androidMain/kotlin/org/michaelbel/movies/main/MainContent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.michaelbel.movies.main | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.lifecycle.compose.collectAsStateWithLifecycle | ||
import org.koin.androidx.compose.koinViewModel | ||
|
||
@Composable | ||
fun MainContent( | ||
viewModel: MainViewModel = koinViewModel(), | ||
enableEdgeToEdge: (Any, Any) -> Unit | ||
) { | ||
val themeData by viewModel.themeData.collectAsStateWithLifecycle() | ||
|
||
MainNavigationContent( | ||
themeData = themeData, | ||
enableEdgeToEdge = enableEdgeToEdge | ||
) | ||
} |
Oops, something went wrong.