Skip to content

Commit

Permalink
Structure dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
kpgalligan committed Dec 7, 2024
1 parent cb9288c commit 794969d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
11 changes: 11 additions & 0 deletions allshared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kmmbridge)
Expand Down Expand Up @@ -26,7 +28,16 @@ kotlin {
}
}

val DEV_BUILD: String by project

kmmbridge {
buildType.setAndFinalize(
if (DEV_BUILD.toBoolean()) {
NativeBuildType.DEBUG
} else {
NativeBuildType.RELEASE
}
)
gitHubReleaseArtifacts()
spm(swiftToolVersion = "5.8") {
iOS { v("14") }
Expand Down
7 changes: 6 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ plugins {
subprojects {
val GROUP: String by project
val LIBRARY_VERSION: String by project
val DEV_BUILD: String by project
group = GROUP
version = LIBRARY_VERSION
version = if (DEV_BUILD.toBoolean()) {
"$LIBRARY_VERSION-${System.currentTimeMillis()}"
} else {
LIBRARY_VERSION
}
}

tasks.register<Delete>("clean") {
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ org.gradle.jvmargs=-Xmx4g

LIBRARY_VERSION=0.1.7
GROUP=co.touchlab.kmmbridgespmquickstart
org.gradle.configuration-cache=true
org.gradle.configuration-cache=true
DEV_BUILD=true

0 comments on commit 794969d

Please # to comment.