https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Sam

10/06/2018, 9:25 PM
If I have a set of targets defined from presets what is the command line invocation to just build/test one of the targets?
Copy code
targets {
        fromPreset(presets.iosX64, 'ios') {
            compilations.main.outputKinds('FRAMEWORK')
        }
        fromPreset(presets.android, 'android')
        fromPreset(presets.jvm, 'jvm')
    }
l

Liliia

10/08/2018, 9:02 AM
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
👍 1