Skip to content

Commit

Permalink
refactor build process
Browse files Browse the repository at this point in the history
  • Loading branch information
stslex committed Oct 27, 2024
1 parent 3de6a02 commit 6284f70
Show file tree
Hide file tree
Showing 263 changed files with 1,615 additions and 1,560 deletions.
20 changes: 11 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
*.iml
.gradle
**/build/
**/release/
xcuserdata
!src/**/build/
local.properties
.idea
.kotlin
.fleet
.DS_Store
build
captures
.externalNativeBuild
.cxx
local.properties
xcuserdata
play_config.*
keystore.*
Gemfile.lock

**/*.podspec

*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
**/xcshareddata/WorkspaceSettings.xcsettings
.fleet
**/*.podspec
/iosApp/Podfile.lock
/iosApp/Pods
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is a Kotlin Multiplatform project targeting Android, iOS, Desktop, Server.
* `/shared` is for the code that will be shared between all targets in the project.
The most important subfolder is `commonMain`. If preferred, you can add code to the platform-specific folders here too.

* `/composeApp` is for code that will be shared across your Compose Multiplatform applications.
* `/commonApp` is for code that will be shared across your Compose Multiplatform applications.
It contains several subfolders:
- `commonMain` is for code that’s common for all targets.
- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name.
Expand Down
2 changes: 1 addition & 1 deletion build-logic/convention/src/main/kotlin/AppExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal object AppExt {
/**
* Find the id of plugin
*/
fun VersionCatalog.findPluginId(name: String) = findPlugin(name)
fun VersionCatalog.findPluginId(name: String): String = findPlugin(name)
.get()
.get()
.pluginId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ fun Project.configureKMPCompose(
// todo need to add compose dependencies
implementation(compose.ui)
implementation(compose.material3)
implementation(compose.material)
implementation(compose.foundation)
implementation(compose.components.uiToolingPreview)
implementation(compose.components.resources)
implementation(compose.runtime)
implementation(libs.findLibrary("kotlinx-collections-immutable").get())
implementation(libs.findLibrary("koin-compose").get())
implementation(libs.findLibrary("lifecycle-viewmodel").get())
implementation(libs.findLibrary("kamel").get())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.gradle.api.Project
import org.gradle.kotlin.dsl.dependencies

fun Project.configureKotlinAndroidCompose(
commonExtension: CommonExtension<*, *, *, *, *>,
commonExtension: CommonExtension<*, *, *, *, *, *>,
) = commonExtension.apply {
buildFeatures.compose = true
composeOptions.kotlinCompilerExtensionVersion = libs.findVersionString("compose-compiler")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal fun Project.configureKotlinMultiplatform(
extension: KotlinMultiplatformExtension,
kspExtension: KspExtension
) = extension.apply {
kspExtension.arg("KOIN_CONFIG_CHECK", "true")
kspExtension.arg("KOIN_CONFIG_CHECK", true.toString())

jvmToolchain(17)

Expand Down
24 changes: 24 additions & 0 deletions commonApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins {
alias(libs.plugins.convention.kmp.application)
}

kotlin {
sourceSets.apply {
commonMain.dependencies {
implementation(project(":core:core"))
implementation(project(":core:network"))
implementation(project(":core:database"))
implementation(project(":core:ui"))

implementation(project(":feature:film_feed"))
implementation(project(":feature:film"))
implementation(project(":feature:profile"))
implementation(project(":feature:match_feed"))
implementation(project(":feature:auth"))
implementation(project(":feature:follower"))
implementation(project(":feature:favourite"))
implementation(project(":feature:settings"))
implementation(project(":feature:match"))
}
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import org.koin.android.BuildConfig
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ import androidx.compose.runtime.Composable
import com.stslex.wizard.core.core.coreModule
import com.stslex.wizard.core.database.di.coreDatabaseModule
import com.stslex.wizard.core.database.di.userSettingsModule
import com.stslex.core.ui.di.coreUiModule
import com.stslex.core.ui.theme.AppTheme
import com.stslex.feature.auth.di.featureAuthModule
import com.stslex.wizard.core.network.di.coreNetworkModule
import com.stslex.wizard.core.ui.di.coreUiModule
import com.stslex.wizard.core.ui.theme.AppTheme
import com.stslex.wizard.di.appModule
import com.stslex.wizard.feature.auth.di.featureAuthModule
import com.stslex.wizard.feature.favourite.di.featureFavouriteModule
import com.stslex.wizard.feature.film.di.featureFilmModule
import com.stslex.feature.film_feed.di.featureFeedModule
import com.stslex.wizard.feature.film_feed.di.featureFeedModule
import com.stslex.wizard.feature.follower.di.featureFollowerModule
import com.stslex.wizard.feature.match.di.featureMatchModule
import com.stslex.feature.match_feed.di.featureMatchFeedModule
import com.stslex.feature.profile.di.featureProfileModule
import com.stslex.wizard.feature.match_feed.di.featureMatchFeedModule
import com.stslex.wizard.feature.profile.di.featureProfileModule
import com.stslex.wizard.feature.settings.di.featureSettingsModule
import com.stslex.wizard.di.appModule
import org.koin.compose.KoinApplication
import org.koin.core.KoinApplication

Expand All @@ -41,7 +42,7 @@ private fun KoinApplication.setupCommonModules() {
appModule,
coreModule,
coreUiModule,
com.stslex.wizard.core.network.di.coreNetworkModule,
coreNetworkModule,
userSettingsModule,
coreDatabaseModule,
featureFeedModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import cafe.adriel.voyager.navigator.Navigator
import cafe.adriel.voyager.transitions.SlideTransition
import com.stslex.core.network.utils.token.AuthController
import com.stslex.core.ui.navigation.AppNavigator
import com.stslex.core.ui.navigation.AppScreen
import com.stslex.feature.auth.ui.AuthScreen
import com.stslex.wizard.core.network.utils.token.AuthController
import com.stslex.wizard.core.ui.navigation.AppNavigator
import com.stslex.wizard.core.ui.navigation.AppScreen
import com.stslex.wizard.feature.auth.ui.AuthScreen
import com.stslex.wizard.main_screen.MainScreen
import org.koin.compose.getKoin

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.stslex.wizard.di

import com.stslex.core.ui.navigation.AppNavigator
import com.stslex.wizard.core.ui.navigation.AppNavigator
import com.stslex.wizard.navigator.AppNavigatorImpl
import org.koin.dsl.module

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import androidx.compose.ui.Modifier
import cafe.adriel.voyager.core.screen.Screen
import cafe.adriel.voyager.navigator.tab.CurrentTab
import cafe.adriel.voyager.navigator.tab.TabNavigator
import com.stslex.core.ui.mvi.setupNavigator
import com.stslex.wizard.core.ui.mvi.setupNavigator
import com.stslex.wizard.main_screen.bottom_nav_bar.BottomNavigationBar
import com.stslex.wizard.main_screen.bottom_nav_bar.BottomNavigationTabs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import cafe.adriel.voyager.navigator.Navigator
import cafe.adriel.voyager.navigator.tab.Tab
import cafe.adriel.voyager.navigator.tab.TabOptions
import cafe.adriel.voyager.transitions.SlideTransition
import com.stslex.feature.film_feed.ui.FeedScreen
import com.stslex.wizard.feature.film_feed.ui.FeedScreen

object FeedTab : Tab {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import androidx.compose.ui.graphics.vector.rememberVectorPainter
import cafe.adriel.voyager.navigator.Navigator
import cafe.adriel.voyager.navigator.tab.Tab
import cafe.adriel.voyager.navigator.tab.TabOptions
import com.stslex.core.ui.navigation.args.MatchScreenArgs
import com.stslex.feature.match.ui.MatchScreen
import com.stslex.wizard.core.ui.navigation.args.MatchScreenArgs
import com.stslex.wizard.feature.match.ui.MatchScreen

object MatchTab : Tab {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import cafe.adriel.voyager.navigator.Navigator
import cafe.adriel.voyager.navigator.tab.Tab
import cafe.adriel.voyager.navigator.tab.TabOptions
import com.stslex.wizard.feature.profile.navigation.ProfileScreenArguments
import com.stslex.feature.profile.ui.ProfileScreen
import com.stslex.wizard.feature.profile.ui.ProfileScreen

object ProfileTab : Tab {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.stslex.wizard.navigator

import cafe.adriel.voyager.navigator.Navigator
import com.stslex.core.ui.navigation.AppNavigator
import com.stslex.core.ui.navigation.AppScreen
import com.stslex.feature.auth.ui.AuthScreen
import com.stslex.wizard.core.ui.navigation.AppNavigator
import com.stslex.wizard.core.ui.navigation.AppScreen
import com.stslex.wizard.feature.auth.ui.AuthScreen
import com.stslex.wizard.feature.favourite.FavouriteScreen
import com.stslex.wizard.feature.film.ui.FilmScreen
import com.stslex.wizard.feature.follower.navigation.FollowerScreenArgs
import com.stslex.wizard.feature.follower.ui.FollowerScreen
import com.stslex.feature.match.ui.MatchScreen
import com.stslex.feature.match_feed.ui.MatchFeedScreen
import com.stslex.wizard.feature.match.ui.MatchScreen
import com.stslex.wizard.feature.match_feed.ui.MatchFeedScreen
import com.stslex.wizard.feature.settings.ui.SettingsScreen
import com.stslex.wizard.main_screen.MainScreen

Expand Down
113 changes: 0 additions & 113 deletions composeApp/build.gradle.kts

This file was deleted.

Loading

0 comments on commit 6284f70

Please sign in to comment.