Skip to content

Commit

Permalink
Debug-enabled build
Browse files Browse the repository at this point in the history
  • Loading branch information
kpgalligan committed Dec 13, 2024
1 parent 7233e43 commit fe4b0cc
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 32 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/KMMBridge-Debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ jobs:
id: output
run: echo "${{ steps.versionPropertyValue.outputs.propVal }}"

- id: trimcommit
uses: prompt/actions-commit-hash@v3
with:
commit: ${{ github.sha }}

- name: Touchlab Sample Sanity Check (Ignore this for your CI)
uses: touchlab/sample-group-sanity-check@main

Expand All @@ -51,14 +46,24 @@ jobs:
~/.konan
key: ${{ runner.os }}-v4-${{ hashFiles('*.gradle.kts') }}

- name: Create or Find Artifact Release
id: devrelease
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: "${{ steps.versionPropertyValue.outputs.propVal }}"

- name: Build Main
run: ./gradlew kmmBridgePublish -PLIBRARY_VERSION=${{ steps.versionPropertyValue.outputs.propVal }}-${{ steps.trimcommit.outputs.short }} -PENABLE_PUBLISHING=true -PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} -PGITHUB_REPO=${{ github.repository }} --no-daemon --info --stacktrace
run: |
./gradlew publishKotlinMultiplatformPublicationToGitHubPackagesRepository publishAndroidDebugPublicationToGitHubPackagesRepository publishAndroidReleasePublicationToGitHubPackagesRepository kmmBridgePublish \
-PNATIVE_BUILD_TYPE=DEBUG -PGITHUB_ARTIFACT_RELEASE_ID=${{ steps.devrelease.outputs.id }} -PENABLE_PUBLISHING=true -PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} -PGITHUB_REPO=${{ github.repository }} \
--no-daemon --info --stacktrace
env:
GRADLE_OPTS: -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=512m"

- uses: touchlab/ga-update-release-tag@v1
id: update-release-tag
with:
commitMessage: "KMP SPM package release for ${{ steps.versionPropertyValue.outputs.propVal }}-${{ steps.trimcommit.outputs.short }}"
tagMessage: "KMP release version ${{ steps.versionPropertyValue.outputs.propVal }}-${{ steps.trimcommit.outputs.short }}"
tagVersion: ${{ steps.versionPropertyValue.outputs.propVal }}-${{ steps.trimcommit.outputs.short }}
commitMessage: "KMP SPM package release for ${{ steps.versionPropertyValue.outputs.propVal }}"
tagMessage: "KMP release version ${{ steps.versionPropertyValue.outputs.propVal }}"
tagVersion: ${{ steps.versionPropertyValue.outputs.propVal }}
9 changes: 0 additions & 9 deletions allshared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,7 @@ 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
8 changes: 2 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ plugins {
subprojects {
val GROUP: String by project
val LIBRARY_VERSION: String by project
val DEV_BUILD: String by project

group = GROUP
version = if (DEV_BUILD.toBoolean()) {
"$LIBRARY_VERSION-${System.currentTimeMillis()}"
} else {
LIBRARY_VERSION
}
version = LIBRARY_VERSION
}

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

LIBRARY_VERSION=0.2.0
GROUP=co.touchlab.kmmbridgespmquickstart
org.gradle.configuration-cache=true
DEV_BUILD=true
# org.gradle.configuration-cache=true No config cache with maven... https://github.com/touchlab/KMMBridge/issues/272
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ targetSdk = "34"
compileSdk = "34"

# Dependencies
kotlin = "2.0.10"
kmmBridge = "1.1.0"
kotlin = "2.0.21"
kmmBridge = "1.1.2-a1"
android-gradle-plugin = "8.2.0"
coroutines = "1.8.1"
kotlinx-datetime = "0.6.0"
coroutines = "1.9.0"
kotlinx-datetime = "0.6.1"
ktor = "2.3.12"

stately = "2.0.7"
stately = "2.1.0"
kermit = "2.0.4"
skie = "0.8.4"
skie = "0.10.0"

multiplatformSettings = "1.1.1"
sqlDelight = "2.0.2"
Expand Down

0 comments on commit fe4b0cc

Please sign in to comment.