Rename sensitive flag to isTransient and inverse logic, add file outputs
isTransient with default value as false makes it a bit more readable Some Compiler Plugins can use file outputs properties to dump some data there and gradle can support incremental build with file outputs.
This commit is contained in:
@@ -53,22 +53,28 @@ sealed class PluginOption {
|
||||
abstract val key: String
|
||||
|
||||
/**
|
||||
* when true a value of given plugin option is sensitive for incremental compilation
|
||||
* when false compilation task can be skipped even if value differs from previous one
|
||||
* Indicates whether value of [PluginOption] should be stored for incremental build checks.
|
||||
* Value changes of non-transient [PluginOption] will invalidate incremental caches.
|
||||
*/
|
||||
abstract val sensitive: Boolean
|
||||
abstract val isTransient: Boolean
|
||||
}
|
||||
|
||||
data class StringOption(
|
||||
override val key: String,
|
||||
val value: String,
|
||||
override val sensitive: Boolean = true
|
||||
override val isTransient: Boolean = false
|
||||
) : PluginOption()
|
||||
|
||||
data class FilesOption(
|
||||
override val key: String,
|
||||
val files: List<File>,
|
||||
override val sensitive: Boolean = true
|
||||
/**
|
||||
* Indicates whether FilesOption is used as input or output during compilation
|
||||
* false means input
|
||||
* true means output
|
||||
*/
|
||||
val isOutput: Boolean = false,
|
||||
override val isTransient: Boolean = false
|
||||
) : PluginOption()
|
||||
|
||||
// TODO: It should be part of "Compilation Process": KotlinModule.compilationRequestFor(METADATA | PLATFORM) -> CompilationRequest
|
||||
|
||||
Reference in New Issue
Block a user