diff --git a/buildSrc/src/main/kotlin/DownloadPythonTask.kt b/buildSrc/src/main/kotlin/DownloadPythonTask.kt index 6ac8f58..c2667ad 100644 --- a/buildSrc/src/main/kotlin/DownloadPythonTask.kt +++ b/buildSrc/src/main/kotlin/DownloadPythonTask.kt @@ -30,6 +30,7 @@ abstract class DownloadPythonTask : DefaultTask() { enum class Platform { Windows, Linux, + MacOS, } @get:Input @@ -56,6 +57,7 @@ abstract class DownloadPythonTask : DefaultTask() { val hostOs = when (platform) { Platform.Windows -> "pc-windows-msvc" Platform.Linux -> "unknown-linux-gnu" + Platform.MacOS -> "apple-darwin" else -> throw IllegalArgumentException("Unsupported platform: $platform") } val tmpFile by tarFile diff --git a/kpy-library/build.gradle.kts b/kpy-library/build.gradle.kts index 3d9dccf..9218ecf 100644 --- a/kpy-library/build.gradle.kts +++ b/kpy-library/build.gradle.kts @@ -39,6 +39,7 @@ kotlin { platform = when (konanTarget) { KonanTarget.MINGW_X64 -> DownloadPythonTask.Platform.Windows KonanTarget.LINUX_X64 -> DownloadPythonTask.Platform.Linux + KonanTarget.MACOS_X64 -> DownloadPythonTask.Platform.MacOS else -> throw IllegalArgumentException("Unsupported target: $targetName") } }