Skip to content

Commit

Permalink
move build-konfig into another module
Browse files Browse the repository at this point in the history
  • Loading branch information
makeevrserg committed Oct 15, 2023
1 parent feb4eb0 commit 6e829c5
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ modules/services/xlsx/build
modules/services/xlsx/libs
modules/services/ads-yandex/build
modules/services/wear-messenger/build
modules/services/build-konfig/build
# Features ----------------------------------
modules/features/dialog-confirm/build
modules/features/words-local/build
Expand Down
13 changes: 0 additions & 13 deletions modules/features/root/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@file:Suppress("UnusedPrivateMember")

import ru.astrainteractive.gradleplugin.util.GradleProperty.Companion.gradleProperty
import ru.astrainteractive.gradleplugin.util.ProjectProperties.projectInfo

plugins {
Expand All @@ -9,22 +8,10 @@ plugins {
kotlin("native.cocoapods")
id("ru.astrainteractive.gradleplugin.java.core")
id("ru.astrainteractive.gradleplugin.android.core")
id("com.github.gmazzo.buildconfig")
id("dev.icerock.mobile.multiplatform-resources")
alias(libs.plugins.kotlin.serialization)
}

buildConfig {
className("BuildKonfig") // forces the class name. Defaults to 'BuildConfig'
packageName("${projectInfo.group}.shared") // forces the package. Defaults to '${project.group}'
buildConfigField(
"String",
"VERSION_CODE",
"\"${gradleProperty("project.version.code").integer}\""
)
buildConfigField("String", "VERSION_NAME", "\"${projectInfo.versionString}\"")
}

kotlin {
android()
ios()
Expand Down
3 changes: 2 additions & 1 deletion modules/features/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ kotlin {
implementation(libs.decompose.core)
implementation(libs.decompose.compose.jetbrains)
// Local
implementation(projects.modules.features.splash)
implementation(projects.modules.services.resources)
implementation(projects.modules.services.coreUi)
implementation(projects.modules.services.buildKonfig)
implementation(projects.modules.features.splash)
implementation(projects.modules.features.root)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import com.makeevrserg.empireprojekt.mobile.buildkonfig.BuildKonfig
import com.makeevrserg.empireprojekt.mobile.core.ui.components.RowSettingTextInfo
import com.makeevrserg.empireprojekt.mobile.core.ui.components.navBarsPadding
import com.makeevrserg.empireprojekt.mobile.core.ui.theme.AppTheme
import com.makeevrserg.empireprojekt.mobile.features.ui.info.components.LinkWidget
import com.makeevrserg.empireprojekt.mobile.features.ui.info.data.InfoScreenLinks
import com.makeevrserg.empireprojekt.mobile.services.core.LinkBrowser
import com.makeevrserg.empireprojekt.mobile.shared.BuildKonfig

@Composable
fun InfoScreen(
Expand Down
33 changes: 33 additions & 0 deletions modules/services/build-konfig/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@file:Suppress("UnusedPrivateMember")

import ru.astrainteractive.gradleplugin.util.GradleProperty.Companion.gradleProperty
import ru.astrainteractive.gradleplugin.util.ProjectProperties.projectInfo

plugins {
id("com.android.library")
kotlin("multiplatform")
id("ru.astrainteractive.gradleplugin.java.core")
id("com.github.gmazzo.buildconfig")
id("ru.astrainteractive.gradleplugin.android.core")
}

buildConfig {
className("BuildKonfig") // forces the class name. Defaults to 'BuildConfig'
packageName("${projectInfo.group}.buildkonfig") // forces the package. Defaults to '${project.group}'
buildConfigField(
"String",
"VERSION_CODE",
"\"${gradleProperty("project.version.code").integer}\""
)
buildConfigField("String", "VERSION_NAME", "\"${projectInfo.versionString}\"")
}

kotlin {
android()
ios()
iosSimulatorArm64()
}

android {
namespace = "${projectInfo.group}.buildkonfig"
}
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ include(":modules:services:resources")
include(":modules:services:core-ui")
include(":modules:services:core")
include(":modules:services:wear-messenger")
include(":modules:services:build-konfig")
// Feature
include(":modules:features:root")
include(":modules:features:splash")
Expand Down

0 comments on commit 6e829c5

Please sign in to comment.