All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptionsHelper.kt Maven / Gradle / Ivy

There is a newer version: 2.1.0-RC
Show newest version
// DO NOT EDIT MANUALLY!
// Generated by org/jetbrains/kotlin/generators/arguments/GenerateGradleOptions.kt
// To regenerate run 'generateGradleOptions' task
@file:Suppress("RemoveRedundantQualifierName", "Deprecation", "Deprecation_Error", "DuplicatedCode")

package org.jetbrains.kotlin.gradle.dsl

internal object KotlinJvmCompilerOptionsHelper {

    internal fun fillCompilerArguments(
        from: org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions,
        args: org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments,
    ) {
        org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptionsHelper.fillCompilerArguments(from, args)
        args.javaParameters = from.javaParameters.get()
        args.jvmTarget = from.jvmTarget.get().target
        args.moduleName = from.moduleName.orNull
        args.noJdk = from.noJdk.get()

        // Arguments with always default values when used from build tools
        args.noStdlib = true
        args.noReflect = true
        args.allowNoSourceFiles = true
    }

    internal fun syncOptionsAsConvention(
        from: org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions,
        into: org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions,
    ) {
        org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptionsHelper.syncOptionsAsConvention(from, into)
        into.javaParameters.convention(from.javaParameters)
        into.jvmTarget.convention(from.jvmTarget)
        into.moduleName.convention(from.moduleName)
        into.noJdk.convention(from.noJdk)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy