Skip to content

Commit

Permalink
Read parameter to set default native build type (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpgalligan authored Dec 8, 2024
1 parent 2a8751d commit bc335c6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true

GROUP=co.touchlab.kmmbridge
VERSION_NAME=1.1.0
VERSION_NAME=1.1.1
VERSION_NAME_3x=0.3.7

POM_URL=https://github.com/touchlab/KMMBridge
Expand Down
9 changes: 8 additions & 1 deletion kmmbridge/src/main/kotlin/co/touchlab/kmmbridge/KMMBridge.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ abstract class BaseKMMBridgePlugin : Plugin<Project> {
val extension = extensions.create<KmmBridgeExtension>(EXTENSION_NAME)

extension.dependencyManagers.convention(emptyList())
extension.buildType.convention(NativeBuildType.RELEASE)

val defaultNativeBuildType = if (project.findStringProperty("NATIVE_BUILD_TYPE") == "DEBUG") {
NativeBuildType.DEBUG
} else {
NativeBuildType.RELEASE
}

extension.buildType.convention(defaultNativeBuildType)

afterEvaluate {
val kmmBridgeExtension = extensions.getByType<KmmBridgeExtension>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ interface KmmBridgeExtension {

val buildType: Property<NativeBuildType>


@Suppress("unused")
fun Project.s3PublicArtifacts(
region: String,
Expand Down

0 comments on commit bc335c6

Please # to comment.