Kapt: Add DUMP_DEFAULT_PARAMETER_VALUES flag (KT-29355)
Put initializers on fields when corresponding primary constructor parameters have a default value specified. The new behavior is available under the new 'DUMP_DEFAULT_PARAMETER_VALUES' flag. Note that this doesn't affect regular functions with default parameter values, as well as primary constructor parameters without a 'val' or 'var' keyword.
This commit is contained in:
+1
@@ -366,6 +366,7 @@ class Kapt3KotlinGradleSubplugin : KotlinGradleSubplugin<KotlinCompile> {
|
||||
|
||||
pluginOptions += SubpluginOption("useLightAnalysis", "${kaptExtension.useLightAnalysis}")
|
||||
pluginOptions += SubpluginOption("correctErrorTypes", "${kaptExtension.correctErrorTypes}")
|
||||
pluginOptions += SubpluginOption("dumpDefaultParameterValues", "${kaptExtension.dumpDefaultParameterValues}")
|
||||
pluginOptions += SubpluginOption("mapDiagnosticLocations", "${kaptExtension.mapDiagnosticLocations}")
|
||||
pluginOptions += SubpluginOption("strictMode", "${kaptExtension.strictMode}")
|
||||
pluginOptions += SubpluginOption("showProcessorTimings", "${kaptExtension.showProcessorTimings}")
|
||||
|
||||
+2
@@ -29,6 +29,8 @@ open class KaptExtension {
|
||||
|
||||
open var correctErrorTypes: Boolean = false
|
||||
|
||||
open var dumpDefaultParameterValues: Boolean = false
|
||||
|
||||
open var mapDiagnosticLocations: Boolean = false
|
||||
|
||||
open var strictMode: Boolean = false
|
||||
|
||||
Reference in New Issue
Block a user