mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2025-09-08 01:29:45 +00:00
fixes
This commit is contained in:
@@ -1,38 +1,20 @@
|
||||
kotlin {
|
||||
// def hostOs = System.getProperty("os.name")
|
||||
// def isMingwX64 = hostOs.startsWith("Windows")
|
||||
// def isArch64 = System.getProperty("os.arch") == "aarch64"
|
||||
//
|
||||
// def nativeTarget
|
||||
// if (hostOs == "Linux") {
|
||||
// if (isArch64) {
|
||||
// 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.")
|
||||
// }
|
||||
// }
|
||||
def hostOs = System.getProperty("os.name")
|
||||
def isMingwX64 = hostOs.startsWith("Windows")
|
||||
def isArch64 = System.getProperty("os.arch") == "aarch64"
|
||||
|
||||
// sourceSets {
|
||||
// nativeMain {
|
||||
// dependencies {
|
||||
// def engine
|
||||
//
|
||||
// if (hostOs == "Linux") if (isArch64) engine = "cio" else engine = "curl"
|
||||
// else if (isMingwX64) engine = "winhttp"
|
||||
// else throw new GradleException("Host OS is not supported in Kotlin/Native.")
|
||||
//
|
||||
// api "io.ktor:ktor-client-$engine:$ktor_version"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
linuxX64() { binaries { executable() } }
|
||||
mingwX64() { binaries { executable() } }
|
||||
linuxArm64() { binaries { executable() } }
|
||||
def nativeTarget
|
||||
if (hostOs == "Linux") {
|
||||
if (isArch64) {
|
||||
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.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user