Skip to content

Commit f5172ee

Browse files
2 parents 0618dec + 6f11194 commit f5172ee

File tree

3 files changed

+26
-35
lines changed

3 files changed

+26
-35
lines changed

.github/workflows/main.yml

+19-34
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build macOS App
1+
name: Build
22

33
on:
44
push:
@@ -7,37 +7,22 @@ on:
77

88
jobs:
99
build:
10-
runs-on: macos-14
10+
runs-on: macos-13
1111
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v2
14-
15-
- name: Set up Xcode
16-
uses: maxim-lobanov/setup-xcode@v1
17-
with:
18-
xcode-version: '15.1'
19-
20-
- name: Build the project
21-
run: xcodebuild -project AndroidTools/AndroidTools.xcodeproj -scheme AndroidTools -sdk macosx CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
22-
23-
- name: Archive the project
24-
run: xcodebuild -project AndroidTools/AndroidTools.xcodeproj -scheme AndroidTools -sdk macosx -configuration Release archive -archivePath ${{github.workspace}}/build/AndroidTools.xcarchive CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
25-
26-
- name: Export the archive
27-
run: |
28-
xcodebuild -exportArchive \
29-
-archivePath ${{github.workspace}}/build/AndroidTools.xcarchive \
30-
-exportPath ${{github.workspace}}/build \
31-
-exportOptionsPlist AndroidTools/ExportOptions.plist \
32-
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
33-
34-
- name: List files
35-
run: ls -l ${{github.workspace}}/build/
36-
37-
- name: Upload Artifacts
38-
uses: actions/upload-artifact@v2
39-
with:
40-
name: AndroidTools
41-
path: |
42-
${{github.workspace}}/build/*.pkg
43-
${{github.workspace}}/build/*.app
12+
- name: Checkout source code
13+
uses: actions/checkout@v3
14+
15+
- name: Set up JDK 17
16+
uses: actions/setup-java@v3
17+
with:
18+
distribution: 'zulu'
19+
java-version: '17'
20+
21+
- name: Build the app
22+
run: ./gradlew packageDmg
23+
24+
- name: Upload build artifacts
25+
uses: actions/upload-artifact@v3
26+
with:
27+
name: macos-build
28+
path: /Users/runner/work/AndroidTools/AndroidTools/composeApp/build/compose/binaries/main/dmg

composeApp/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ kotlin {
3636

3737
implementation(libs.kotlinx.datetime)
3838

39-
implementation("io.klogging:klogging-jvm:0.7.2")
39+
implementation(libs.klogging)
4040
}
4141
// https://gist.github.com/OysterD3?page=3
4242
// https://betterprogramming.pub/how-to-create-an-auto-updater-for-desktop-application-jetpack-compose-d118db26d65f

gradle/libs.versions.toml

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ koin = "3.4.3"
1212

1313
datetime = "0.6.1"
1414

15+
klogging = "0.7.2"
16+
1517
[libraries]
1618
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
1719
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
@@ -29,6 +31,10 @@ koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
2931
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "datetime" }
3032

3133

34+
klogging = { module = "io.klogging:klogging-jvm", version.ref = "klogging" }
35+
36+
37+
3238
[plugins]
3339
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
3440
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }

0 commit comments

Comments
 (0)