【问题标题】:Build only one executable for Kotlin/Native project只为 Kotlin/Native 项目构建一个可执行文件
【发布时间】:2019-07-29 22:54:51
【问题描述】:

Kotlin/Native allows to produce multiple binaries.

kotlin {
    binaries {
        executable()                       // Executable with default name.
        executable("foo")                  // Custom binary name.
        executable("bar", listOf(RELEASE)) // Custom build types.
        ...
    }
}

gradle build 将为每个可执行文件触发构建。在某些时候,制作所有可执行二进制文件开始需要很长时间。是否可以只构建一个可执行文件?类似gradle buildFoo

【问题讨论】:

    标签: kotlin kotlin-native


    【解决方案1】:

    Gradle 插件自己生成的名称为run(execName)(buildtype)Executable(OS) 的任务。此外,您可以使用任务link(execName)(buildtype)Executable(OS) 生成二进制文件。

    【讨论】:

      猜你喜欢
      • 2018-12-29
      • 2011-03-02
      • 1970-01-01
      • 1970-01-01
      • 2014-02-13
      • 2011-12-17
      • 2020-09-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多