main.util.KlipOption.kt Maven / Gradle / Ivy
package dev.petuska.klip.plugin.util
import org.jetbrains.kotlin.config.CompilerConfigurationKey
/**
* Internal-use class containing information about command line options passed by gradle plugin to
* kotlin plugin
*/
sealed class KlipOption(
val name: String,
val valueDescription: String,
val description: String,
) {
val key: CompilerConfigurationKey = CompilerConfigurationKey(name)
/** Toggles the compiler processing on/off */
object Enabled :
KlipOption(
name = "enabled",
valueDescription = "",
description = "whether the plugin is enabled",
)
/** Value passed to "klippable" functions to indicate that klips should be updated */
object Update :
KlipOption(
name = "update",
valueDescription = "",
description = "whether the klips should be updated",
)
/** Registers an annotation to be used to identify "klippable" functions */
object KlipAnnotation :
KlipOption>(
name = "klipAnnotation",
valueDescription = "",
description = "annotation to register for compiler processing",
)
/**
* Registers an annotation to be used to identify "scope" functions under which "klippable"
* annotation detection should happen
*/
object ScopeAnnotation :
KlipOption>(
name = "scopeAnnotation",
valueDescription = "",
description =
"annotation to register function scope for compiler klip detection and processing",
)
/**
* Registers a function to be used to identify "scope" functions under which "klippable" function
* detection should happen
*/
object ScopeFunction :
KlipOption>(
name = "scopeFunction",
valueDescription = "",
description =
"function to register function scope for compiler klip detection and processing",
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy