Skip to content

Commit e06b1ae

Browse files
committed
build: Add macos native tasks
1 parent d52cf8a commit e06b1ae

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

composeApp/build.gradle.kts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,28 @@ compose.desktop {
167167
}
168168
}
169169
}
170+
171+
tasks.register<Exec>("assembleMiuixMacosArm64ReleaseBinary") {
172+
dependsOn(":composeApp:desktopTest", ":composeApp:linkReleaseExecutableMacosArm64")
173+
commandLine("lipo", "-create", "-output", "Miuix_macOSArm64", "bin/macosArm64/releaseExecutable/Miuix.kexe")
174+
workingDir = layout.buildDirectory.get().asFile
175+
group = "macos native"
176+
description = "Build macOS Arm64 binary"
177+
}
178+
179+
tasks.register<Exec>("assembleMiuixMacosX64ReleaseBinary") {
180+
dependsOn(":composeApp:desktopTest", ":composeApp:linkReleaseExecutableMacosX64")
181+
commandLine("lipo", "-create", "-output", "Miuix_macOSX64", "bin/macosX64/releaseExecutable/Miuix.kexe")
182+
workingDir = layout.buildDirectory.get().asFile
183+
group = "macos native"
184+
description = "Build macOS X64 binary"
185+
}
186+
187+
tasks.register<Exec>("assembleMiuixMacosUniversalReleaseBinary") {
188+
dependsOn(":composeApp:desktopTest", ":composeApp:linkReleaseExecutableMacosX64", ":composeApp:linkReleaseExecutableMacosArm64")
189+
commandLine("lipo", "-create", "-output", "Miuix_macOS", "bin/macosX64/releaseExecutable/Miuix.kexe", "bin/macosArm64/releaseExecutable/Miuix.kexe")
190+
workingDir = layout.buildDirectory.get().asFile
191+
group = "macos native"
192+
description = "Build macOS universal binary"
193+
}
194+

0 commit comments

Comments
 (0)