Commit 127166c8 authored by dsq's avatar dsq

kotlin升级

parent 0e97e00f
......@@ -39,42 +39,40 @@ kotlin {
}
ohosArm64 {
ohosX64 {
binaries.sharedLib {
baseName = "kn" // 共享库名称为kn
export(libs.compose.multiplatform.export) // 导出compose多平台库的接口
// 确保链接系统 zlib,使 libkn.so 的 NEEDED 包含 libz.so
baseName = "kn"
export(libs.compose.multiplatform.export)
linkerOpts("-lz")
// 避免 release 优化在模拟器上触发 SIGILL(非法指令)
optimized = false
}
// 禁用内联类可能有助于 NAPI
val main by compilations.getting
main.compilerOptions.configure {
freeCompilerArgs.add("-Xbinary=sanitizer=address")
}
//val resource by main.cinterops.creating {
// defFile(file("src/ohosArm64Main/cinterop/resource.def"))
// includeDirs(file("src/ohosArm64Main/cinterop/include"))
// }
val resource by main.cinterops.creating {
defFile(file("src/ohosX64Main/cinterop/resource.def"))
includeDirs(file("src/ohosX64Main/cinterop/include"))
}
}
ohosX64 {
ohosArm64 {
binaries.sharedLib {
baseName = "kn"
export(libs.compose.multiplatform.export)
linkerOpts("-lz")
// 避免 release 优化在模拟器上触发 SIGILL(非法指令)
baseName = "kn" // 共享库名称为kn
export(libs.compose.multiplatform.export) // 导出compose多平台库的接口
optimized = false
}
val main by compilations.getting
val main by compilations.getting // 获取主编译内容
main.compilerOptions.configure {
freeCompilerArgs.add("-Xbinary=sanitizer=address")
freeCompilerArgs.add("-Xbinary=splitBCfile=1")
}
// val resource by main.cinterops.creating {
// defFile(file("src/ohosX64Main/cinterop/resource.def"))
// includeDirs(file("src/ohosX64Main/cinterop/include"))
// }
val resource by main.cinterops.creating {
//配置C interop(cinterop)资源
defFile(file("src/ohosArm64Main/cinterop/resource.def")) // cinterop定义文件
includeDirs(file("src/ohosArm64Main/cinterop/include")) // cinterop包含目录
}
}
sourceSets {
......
[versions]
# Build & Android
agp = "8.2.2"
agp = "8.6.0"
android-compileSdk = "36"
android-minSdk = "24"
android-targetSdk = "36"
......@@ -25,7 +25,7 @@ compose-ui-backhandler = "1.9.2-OH.0.1.2-14"
# Kotlin & testing
junit = "4.13.2"
kotlin = "2.2.21-OH.0.1.0-02"
kotlin = "2.2.21-OH.0.1.0-06"
kotlinx-coroutines = "1.10.2-OH-103"
atomicFu = "0.31.0-OH-001"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment