Skip to content

Commit

Permalink
Merge pull request #2 from makeevrserg/develop
Browse files Browse the repository at this point in the history
split modules
  • Loading branch information
makeevrserg authored Feb 22, 2024
2 parents d720da0 + 0cbfa69 commit 89f8231
Show file tree
Hide file tree
Showing 19 changed files with 95 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ modules/features/splash/ui/build
modules/features/splash/impl/build
modules/features/theme/build
modules/features/theme/impl/build
modules/features/theme/ui/build
modules/features/info/ui/build
modules/features/ui/build

# Services
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ makeevrserg.android.kotlinCompilerExtensionVersion=1.5.3
# Project
makeevrserg.project.name=ApplicationTemplate
makeevrserg.project.group=com.makeevrserg.applicationtemplate
makeevrserg.project.version.string=1.0.1
makeevrserg.project.version.string=1.1.0
makeevrserg.project.version.code=11
makeevrserg.project.description=Template for KMP applcation
makeevrserg.project.developers=makeevrserg|Makeev Roman|[email protected]
Expand Down
1 change: 1 addition & 0 deletions instances/androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ dependencies {
// Local
implementation(projects.modules.features.root.impl)
implementation(projects.modules.features.root.ui)
implementation(projects.modules.features.theme.ui)
implementation(projects.modules.services.coreUi)
implementation(projects.modules.services.coreResources)
}
41 changes: 41 additions & 0 deletions modules/features/info/ui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@file:Suppress("UnusedPrivateMember")

import ru.astrainteractive.gradleplugin.property.extension.ModelPropertyValueExt.requireProjectInfo

plugins {
id("org.jetbrains.compose")
id("com.android.library")
kotlin("multiplatform")
id("ru.astrainteractive.gradleplugin.java.core")
id("ru.astrainteractive.gradleplugin.android.core")
id("ru.astrainteractive.gradleplugin.android.compose")
}

kotlin {
android()
sourceSets {
val commonMain by getting {
dependencies {
// Compose MPP
implementation(compose.foundation)
implementation(compose.ui)
implementation(compose.runtime)
implementation(compose.uiTooling)
implementation(compose.preview)
implementation(compose.material)
implementation(compose.material3)
implementation(compose.materialIconsExtended)
// Moko
implementation(libs.moko.resources.core)
// Local
implementation(projects.modules.services.coreResources)
implementation(projects.modules.services.coreUi)
implementation(projects.modules.services.buildKonfig)
}
}
}
}

android {
namespace = "${requireProjectInfo.group}.features.info.ui"
}
1 change: 1 addition & 0 deletions modules/features/root/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ kotlin {
implementation(projects.modules.features.splash.impl)
implementation(projects.modules.features.splash.ui)
implementation(projects.modules.features.root.impl)
implementation(projects.modules.features.info.ui)
}
}
val androidMain by getting {
Expand Down
40 changes: 40 additions & 0 deletions modules/features/theme/ui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
@file:Suppress("UnusedPrivateMember")

import ru.astrainteractive.gradleplugin.property.extension.ModelPropertyValueExt.requireProjectInfo

plugins {
id("org.jetbrains.compose")
id("com.android.library")
kotlin("multiplatform")
id("ru.astrainteractive.gradleplugin.java.core")
id("ru.astrainteractive.gradleplugin.android.core")
id("ru.astrainteractive.gradleplugin.android.compose")
}

kotlin {
androidTarget()
targetHierarchy.default()
sourceSets {
val commonMain by getting {
dependencies {
// Compose MPP
implementation(compose.foundation)
implementation(compose.ui)
implementation(compose.runtime)
// Local
implementation(projects.modules.services.coreUi)
implementation(projects.modules.features.theme.impl)
}
}
val androidMain by getting {
dependencies {
// Accompanist
implementation(libs.google.accompanist.systemuicontroller)
}
}
}
}

android {
namespace = "${requireProjectInfo.group}.features.theme.ui"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.makeevrserg.applicationtemplate.mobile.features.ui.components
package com.makeevrserg.applicationtemplate.mobile.features.theme.components

import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.makeevrserg.applicationtemplate.mobile.features.ui.components
package com.makeevrserg.applicationtemplate.mobile.features.theme.components

import androidx.compose.runtime.Composable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import com.makeevrserg.applicationtemplate.mobile.core.ui.theme.AdaptThemeFade
import com.makeevrserg.applicationtemplate.mobile.core.ui.theme.ComposeTheme
import com.makeevrserg.applicationtemplate.mobile.features.theme.components.TransparentBars
import com.makeevrserg.applicationtemplate.mobile.features.theme.data.model.Theme
import com.makeevrserg.applicationtemplate.mobile.features.theme.presentation.PreviewThemeSwitcherComponent
import com.makeevrserg.applicationtemplate.mobile.features.theme.presentation.ThemeSwitcherComponent
import com.makeevrserg.applicationtemplate.mobile.features.ui.components.TransparentBars

@Composable
fun ApplicationTheme(
Expand Down
7 changes: 6 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ include(":modules:services:core-resources")
include(":modules:services:core-ui")
include(":modules:services:core")
include(":modules:services:build-konfig")
// Feature
// Feature-root
include(":modules:features:root:impl")
include(":modules:features:root:ui")
// Feature-splash
include(":modules:features:splash:impl")
include(":modules:features:splash:ui")
// Feature-theme
include(":modules:features:theme:impl")
include(":modules:features:theme:ui")
// Feature-info
include(":modules:features:info:ui")

0 comments on commit 89f8231

Please sign in to comment.