上游 · Kotlin/Native binary options
bundleShortVersionString:Sets short bundle version (CFBundleShortVersionString) in the Info.plist file.
全部配置 / KN-BINARY-BUNDLESHORTVERSIONSTRING
Xbinary=bundleShortVersionString · KN-BINARY-BUNDLESHORTVERSIONSTRING · 编译器参数(Native)
默认值:未设置。未指定则为空。使用场合:场景可配。场景可配:有明确目标(性能、包体、安全、兼容)时再改。
用途。写入 Bundle 短版本号。官方说明:Sets short bundle version (CFBundleShortVersionString) in the Info.plist file.
影响。主要改变诊断/日志输出;对产物行为影响通常很小。
适用场景。编译器/后端排查或信息查询;定位完成后关闭冗余输出。
可写。<string> (任意字符串(StringValueParser)。)
定义依据:konan/BinaryOptions.kt 在仓库中打开
// 文件:build.gradle.kts(应用的 Kotlin 模块,例如 composeApp)
kotlin {
ohosArm64 { // 按实际 native target 调整
binaries.all {
freeCompilerArgs += "-Xbinary=bundleShortVersionString=true"
}
}
}
不写这个配置时,编译器会怎么处理?
此选项默认未设置(空列表 / 空映射 / null)。不设置时由其他逻辑决定行为或直接跳过。
未指定则为空。
以下摘抄原文中与本配置最相关的段落,便于速读;完整上下文请点原文。
bundleShortVersionString:Sets short bundle version (CFBundleShortVersionString) in the Info.plist file.