Change 'jvmTarget' backing property visibility to internal.

Allows to check if this property was updated by the user or not.

^KT-45611 In Progress
^KT-43095 In Progress
This commit is contained in:
Yahor Berdnikau
2021-06-21 16:01:19 +02:00
committed by Space
parent 48d170a858
commit 430306b23d
4 changed files with 24 additions and 4 deletions
@@ -17,6 +17,10 @@
package org.jetbrains.kotlin.cli.common.arguments
import kotlin.reflect.KClass
import kotlin.reflect.KVisibility
@Retention(AnnotationRetention.RUNTIME)
annotation class GradleOption(val value: KClass<out DefaultValues> = DefaultValues::class)
annotation class GradleOption(
val value: KClass<out DefaultValues> = DefaultValues::class,
val backingFieldVisibility: KVisibility = KVisibility.PRIVATE
)
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.cli.common.arguments
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
import org.jetbrains.kotlin.config.*
import kotlin.reflect.KVisibility
class K2JVMCompilerArguments : CommonCompilerArguments() {
companion object {
@@ -75,7 +76,10 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
@Argument(value = "-module-name", valueDescription = "<name>", description = "Name of the generated .kotlin_module file")
var moduleName: String? by NullableStringFreezableVar(null)
@GradleOption(DefaultValues.JvmTargetVersions::class)
@GradleOption(
value = DefaultValues.JvmTargetVersions::class,
backingFieldVisibility = KVisibility.INTERNAL
)
@Argument(
value = "-jvm-target",
valueDescription = "<version>",