Interface KotlinJsCompilerOptions

  • All Implemented Interfaces:
    org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions , org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerToolOptions

    
    public interface KotlinJsCompilerOptions
     implements KotlinCommonCompilerOptions
                        

    Compiler options for Kotlin/JS.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Property<Boolean> getFriendModulesDisabled() Disable internal declaration export.
      abstract Property<JsMainFunctionExecutionMode> getMain() Specify whether the 'main' function should be called upon execution.
      abstract Property<Boolean> getMetaInfo() Generate .meta.js and .kjsm files with metadata.
      abstract Property<JsModuleKind> getModuleKind() The kind of JS module generated by the compiler.
      abstract Property<String> getModuleName() Base name of generated files.
      abstract Property<Boolean> getNoStdlib() Don't automatically include the default Kotlin/JS stdlib in compilation dependencies.
      abstract Property<Boolean> getSourceMap() Generate a source map.
      abstract Property<JsSourceMapEmbedMode> getSourceMapEmbedSources() Embed source files into the source map.
      abstract Property<JsSourceMapNamesPolicy> getSourceMapNamesPolicy() Mode for mapping generated names to original names (IR backend only).
      abstract Property<String> getSourceMapPrefix() Add the specified prefix to the paths in the source map.
      abstract Property<String> getTarget() Generate JS files for the specified ECMA version.
      abstract Property<Boolean> getTypedArrays() Translate primitive arrays into JS typed arrays.
      abstract Property<Boolean> getUseEsClasses() Let generated JavaScript code use ES2015 classes.
      • Methods inherited from class org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions

        getApiVersion, getLanguageVersion, getOptIn, getProgressiveMode, getUseK2
      • Methods inherited from class org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerToolOptions

        getAllWarningsAsErrors, getFreeCompilerArgs, getSuppressWarnings, getVerbose
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getMain

        @Input() abstract Property<JsMainFunctionExecutionMode> getMain()

        Specify whether the 'main' function should be called upon execution.

        Possible values: "call", "noCall"

        Default value: JsMainFunctionExecutionMode.CALL

      • getMetaInfo

        @Input() abstract Property<Boolean> getMetaInfo()

        Generate .meta.js and .kjsm files with metadata. Use this to create a library.

        Default value: true

      • getModuleKind

        @Optional()@Input() abstract Property<JsModuleKind> getModuleKind()

        The kind of JS module generated by the compiler. ES modules are enabled by default in case of ES2015 target usage

        Possible values: "plain", "amd", "commonjs", "umd"

        Default value: null

      • getModuleName

        @Optional()@Input() abstract Property<String> getModuleName()

        Base name of generated files.

        Default value: null

      • getNoStdlib

        @Input() abstract Property<Boolean> getNoStdlib()

        Don't automatically include the default Kotlin/JS stdlib in compilation dependencies.

        Default value: true

      • getSourceMap

        @Input() abstract Property<Boolean> getSourceMap()

        Generate a source map.

        Default value: false

      • getSourceMapEmbedSources

        @Optional()@Input() abstract Property<JsSourceMapEmbedMode> getSourceMapEmbedSources()

        Embed source files into the source map.

        Possible values: "never", "always", "inlining"

        Default value: null

      • getSourceMapNamesPolicy

        @Optional()@Input() abstract Property<JsSourceMapNamesPolicy> getSourceMapNamesPolicy()

        Mode for mapping generated names to original names (IR backend only).

        Possible values: "no", "simple-names", "fully-qualified-names"

        Default value: null

      • getSourceMapPrefix

        @Optional()@Input() abstract Property<String> getSourceMapPrefix()

        Add the specified prefix to the paths in the source map.

        Default value: null

      • getTarget

        @Input() abstract Property<String> getTarget()

        Generate JS files for the specified ECMA version.

        Possible values: "es5", "es2015"

        Default value: "es5"

      • getTypedArrays

        @Input() abstract Property<Boolean> getTypedArrays()

        Translate primitive arrays into JS typed arrays.

        Default value: true

      • getUseEsClasses

        @Optional()@Input() abstract Property<Boolean> getUseEsClasses()

        Let generated JavaScript code use ES2015 classes. Enabled by default in case of ES2015 target usage

        Default value: null