Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor build scripts #962

Merged
merged 14 commits into from
Dec 18, 2023
Merged
Prev Previous commit
Next Next commit
Remove local variable
  • Loading branch information
VDovidaytis-HORIS committed Dec 8, 2023
commit 5d5e9bdb542734c4eb3f1fcb525d6a801f0dfb7c
13 changes: 5 additions & 8 deletions python-extension/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,21 @@ plugins {
id "org.jetbrains.kotlin.multiplatform"
}

import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform

def currentOs = DefaultNativePlatform.getCurrentOperatingSystem()

kotlin {

if (project.buildSettings.enable_python_package) {

def target
if (currentOs.macOsX & project.buildSettings.architecture == "x86_64") {
if (project.currentOs.macOsX & project.buildSettings.architecture == "x86_64") {
target = macosX64("native")
} else if (currentOs.macOsX & project.buildSettings.architecture == "arm64") {
} else if (project.currentOs.macOsX & project.buildSettings.architecture == "arm64") {
target = macosArm64("native")
} else if (currentOs.linux & project.buildSettings.architecture == "x86_64") {
} else if (project.currentOs.linux & project.buildSettings.architecture == "x86_64") {
target = linuxX64("native")
} else if (currentOs.linux & project.buildSettings.architecture == "arm64") {
} else if (project.currentOs.linux & project.buildSettings.architecture == "arm64") {
target = linuxArm64("native")
} else if (currentOs.windows) {
} else if (project.currentOs.windows) {
target = mingwX64("native")
} else {
throw new Exception("Unsupported platform! Check project settings.")
Expand Down