Thread
#multiplatform
    s

    Sam

    3 years ago
    If I have a set of targets defined from presets what is the command line invocation to just build/test one of the targets?
    targets {
            fromPreset(presets.iosX64, 'ios') {
                compilations.main.outputKinds('FRAMEWORK')
            }
            fromPreset(presets.android, 'android')
            fromPreset(presets.jvm, 'jvm')
        }
    Liliia

    Liliia

    3 years ago
    To build and test, you may use the following task:
    <targetName>Test
    , read more about it here: http://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#running-tests. For just a build, use
    <targetName>Jar
    or, for native targets,
    compileKotlin<targetName>
    to build a
    klib
    and
    linkDebug<outputKind><targetName>
    or
    linkRelease<outputKind><targetName>
    to create an executable file, framework, *.so, etc. — for example,
    linkDebugFrameworkIos
    ,
    linkDebugExecutableMac
    . There is no straightforward analog for
    build
    and
    assemble
    tasks which is suitable for a specific target, but you may follow the request to get the future updates on the question: https://youtrack.jetbrains.com/issue/KT-27443