mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2024-11-25 19:48:49 +00:00
add support of arch target
This commit is contained in:
parent
53cf212175
commit
89d5a4f911
@ -16,10 +16,21 @@ plugins {
|
|||||||
kotlin {
|
kotlin {
|
||||||
def hostOs = System.getProperty("os.name")
|
def hostOs = System.getProperty("os.name")
|
||||||
def isMingwX64 = hostOs.startsWith("Windows")
|
def isMingwX64 = hostOs.startsWith("Windows")
|
||||||
|
def isArch64 = System.getProperty("os.arch") == "aarch64"
|
||||||
def nativeTarget
|
def nativeTarget
|
||||||
if (hostOs == "Linux") nativeTarget = linuxX64("native") { binaries { executable() } }
|
if (hostOs == "Linux") {
|
||||||
else if (isMingwX64) nativeTarget = mingwX64("native") { binaries { executable() } }
|
if (isArch64) {
|
||||||
else throw new GradleException("Host OS is not supported in Kotlin/Native.")
|
nativeTarget = linuxArm64("native") { binaries { executable() } }
|
||||||
|
} else {
|
||||||
|
nativeTarget = linuxX64("native") { binaries { executable() } }
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isMingwX64) {
|
||||||
|
nativeTarget = mingwX64("native") { binaries { executable() } }
|
||||||
|
} else {
|
||||||
|
throw new GradleException("Host OS is not supported in Kotlin/Native.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
commonMain {
|
commonMain {
|
||||||
|
Loading…
Reference in New Issue
Block a user