Skip to content

Commit 16c53c7

Browse files
committed
simplify app structure
simplify app structure
1 parent 686fa71 commit 16c53c7

File tree

231 files changed

+867
-918
lines changed

Some content is hidden

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

231 files changed

+867
-918
lines changed

processor/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apply from: "${project.rootDir}/gradle/kotlin/processor.gradle"
22

33
group = 'com.kotlitecture.kotli'
4-
version = '0.13.0'
4+
version = '0.14.0'

processor/src/main/kotlin/kotli/template/multiplatform/compose/Rules.kt

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,17 @@ object Rules {
3232
const val AppBuildGradle = "${App}/build.gradle.kts"
3333
const val AppCommonMain = "${AppSrc}/commonMain"
3434
const val AppCommonMainRoot = "${AppCommonMain}/kotlin/kotli/app"
35+
const val AppKt = "${AppCommonMainRoot}/app/App.kt"
36+
const val AppConfigKt = "${AppCommonMainRoot}/app/AppConfig.kt"
37+
const val AppViewModelKt = "${AppCommonMainRoot}/app/AppViewModel.kt"
38+
39+
// app -> common
3540
const val AppCommon = "${AppCommonMainRoot}/common"
36-
const val AppFeature = "${AppCommonMainRoot}/feature"
37-
const val AppKt = "${AppCommonMainRoot}/App.kt"
38-
const val AppConfigKt = "${AppCommonMainRoot}/AppConfig.kt"
39-
const val AppViewModelKt = "${AppCommonMainRoot}/AppViewModel.kt"
4041
const val AppCommonPresentation = "${AppCommon}/presentation"
4142
const val AppCommonConfigKt = "${AppCommon}/CommonConfig.kt"
42-
const val AppConfigureKoinKt = "*/configureKoin.kt"
43-
44-
// app -> di
45-
const val AppDI = "${AppCommonMainRoot}/di"
46-
const val AppDiKt = "${AppDI}/DI.kt"
4743

4844
// app -> misc
45+
const val AppConfigureKoinKt = "*/configureKoin.kt"
4946
const val AppProguardRulesPro = "${App}/assemble/proguard-rules.pro"
5047
const val AppWebPackConfigDir = "app/webpack.config.d"
5148
const val AppSqlDelightConfigJs = "${AppWebPackConfigDir}/sqljs-config.js"
@@ -56,23 +53,21 @@ object Rules {
5653
// app -> common -> presentation -> navigation
5754
const val AppCommonNavigation = "${AppCommonPresentation}/navigation"
5855

59-
// app -> feature -> passcode
60-
const val AppPasscode = "${AppFeature}/passcode"
61-
const val AppDIPasscodeModuleKt = "${AppDI}/feature/PasscodeModule.kt"
56+
// app -> passcode
57+
const val AppPasscode = "${AppCommonMainRoot}/passcode"
6258

63-
// app -> feature -> theme
64-
const val AppTheme = "${AppFeature}/theme"
59+
// app -> theme
60+
const val AppTheme = "${AppCommonMainRoot}/theme"
6561
const val AppThemeConfigKt = "${AppTheme}/ThemeConfig.kt"
66-
const val AppDIThemeModuleKt = "${AppDI}/feature/ThemeModule.kt"
6762

68-
// app -> feature -> navigation
69-
const val AppNavigation = "${AppFeature}/navigation"
63+
// app -> navigation
64+
const val AppNavigation = "${AppCommonMainRoot}/navigation"
7065
const val AppNavigationProvider = "${AppNavigation}/provide/presentation/NavigationProvider.kt"
7166
const val AppBottomNavigationProvider = "${AppNavigation}/provide/presentation/BottomNavigationProvider.kt"
7267
const val AppNavigationViewModel = "${AppNavigation}/provide/presentation/NavigationViewModel.kt"
7368

74-
// app -> feature -> showcases
75-
const val AppShowcases = "${AppFeature}/showcases"
69+
// app -> showcases
70+
const val AppShowcases = "${AppCommonMainRoot}/showcases"
7671
const val AppShowcasesDataflow = "${AppShowcases}/presentation/dataflow"
7772
const val AppShowcasesUserflow = "${AppShowcases}/presentation/userflow"
7873
const val AppShowcasesViewModelKt = "${AppShowcases}/presentation/ShowcasesViewModel.kt"

processor/src/main/kotlin/kotli/template/multiplatform/compose/dataflow/ai/gemini/GeminiProcessor.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ object GeminiProcessor : BaseFeatureProcessor() {
1919
override fun getId(): String = ID
2020
override fun getTags(): List<FeatureTag> = Tags.AllClients
2121
override fun getWebUrl(state: TemplateState): String = "https://github.com/PatilShreyas/generative-ai-kmp"
22-
override fun getIntegrationUrl(state: TemplateState): String = "https://github.com/PatilShreyas/generative-ai-kmp?tab=readme-ov-file#installation-and-usage"
22+
override fun getIntegrationUrl(state: TemplateState): String =
23+
"https://github.com/PatilShreyas/generative-ai-kmp?tab=readme-ov-file#installation-and-usage"
24+
2325
override fun getIntegrationEstimate(state: TemplateState): Long = 1.hours.inWholeMilliseconds
2426

2527
override fun dependencies(): List<Class<out FeatureProcessor>> = listOf(
@@ -41,8 +43,8 @@ object GeminiProcessor : BaseFeatureProcessor() {
4143
)
4244
)
4345
state.onApplyRules(
44-
Rules.AppDiKt,
45-
RemoveMarkedLine("aiSource")
46+
Rules.AppCommonConfigKt,
47+
RemoveMarkedLine("ai")
4648
)
4749
}
4850

processor/src/main/kotlin/kotli/template/multiplatform/compose/dataflow/analytics/facade/FacadeAnalyticsProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ object FacadeAnalyticsProcessor : BaseFeatureProcessor() {
2323
RemoveFile()
2424
)
2525
state.onApplyRules(
26-
Rules.AppDiKt,
26+
Rules.AppCommonConfigKt,
2727
RemoveMarkedLine("AnalyticsSource")
2828
)
2929
}

processor/src/main/kotlin/kotli/template/multiplatform/compose/dataflow/cache/basic/BasicCacheProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ object BasicCacheProcessor : BaseFeatureProcessor() {
4242
RemoveFile()
4343
)
4444
state.onApplyRules(
45-
Rules.AppDiKt,
45+
Rules.AppCommonConfigKt,
4646
RemoveMarkedLine("CacheSource")
4747
)
4848
state.onApplyRules(

processor/src/main/kotlin/kotli/template/multiplatform/compose/dataflow/config/facade/FacadeConfigProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ object FacadeConfigProcessor : BaseFeatureProcessor() {
2323
RemoveFile()
2424
)
2525
state.onApplyRules(
26-
Rules.AppDiKt,
26+
Rules.AppCommonConfigKt,
2727
RemoveMarkedLine("ConfigSource")
2828
)
2929
}

processor/src/main/kotlin/kotli/template/multiplatform/compose/dataflow/database/room/RoomProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ object RoomProcessor : BaseFeatureProcessor() {
8181
RemoveFile()
8282
)
8383
state.onApplyRules(
84-
Rules.AppDiKt,
84+
Rules.AppCommonConfigKt,
8585
RemoveMarkedLine("RoomSource")
8686
)
8787
state.onApplyRules(

processor/src/main/kotlin/kotli/template/multiplatform/compose/dataflow/database/sqldelight/SqlDelightProcessor.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ object SqlDelightProcessor : BaseFeatureProcessor() {
8282
RemoveFile()
8383
)
8484
state.onApplyRules(
85-
Rules.AppDiKt,
85+
Rules.AppCommonConfigKt,
8686
RemoveMarkedLine("SqlDelightSource")
8787
)
8888
state.onApplyRules(
89-
"*/createSqlDriver.kt",
90-
RemoveFile()
89+
"*/PlatformConfig.*.kt",
90+
RemoveMarkedLine("sql"),
9191
)
9292
}
9393

processor/src/main/kotlin/kotli/template/multiplatform/compose/dataflow/encryption/korlibs/KorlibsEncryptionProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object KorlibsEncryptionProcessor : BaseFeatureProcessor() {
3232
RemoveFile()
3333
)
3434
state.onApplyRules(
35-
Rules.AppDiKt,
35+
Rules.AppCommonConfigKt,
3636
RemoveMarkedLine("EncryptionSource")
3737
)
3838
state.onApplyRules(

processor/src/main/kotlin/kotli/template/multiplatform/compose/dataflow/http/ktor/KtorHttpProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ object KtorHttpProcessor : BaseFeatureProcessor() {
3535
RemoveFile()
3636
)
3737
state.onApplyRules(
38-
Rules.AppDiKt,
38+
Rules.AppCommonConfigKt,
3939
RemoveMarkedLine("HttpSource")
4040
)
4141
state.onApplyRules(

0 commit comments

Comments
 (0)