@@ -24,6 +24,7 @@ import org.gradle.api.tasks.TaskAction
24
24
import org.gradle.internal.logging.text.StyledTextOutput
25
25
import org.gradle.internal.logging.text.StyledTextOutputFactory
26
26
import org.gradle.kotlin.dsl.listProperty
27
+ import org.gradle.kotlin.dsl.mapProperty
27
28
import org.gradle.kotlin.dsl.property
28
29
import org.openapitools.codegen.CodegenConstants
29
30
import org.openapitools.codegen.DefaultGenerator
@@ -90,7 +91,7 @@ open class GenerateTask : DefaultTask() {
90
91
* Sets specified system properties.
91
92
*/
92
93
@get:Internal
93
- val systemProperties = project.objects.property< Map < String , String > >()
94
+ val systemProperties = project.objects.mapProperty< String , String >()
94
95
95
96
/* *
96
97
* Path to json configuration file.
@@ -140,27 +141,27 @@ open class GenerateTask : DefaultTask() {
140
141
* Sets instantiation type mappings.
141
142
*/
142
143
@get:Internal
143
- val instantiationTypes = project.objects.property< Map < String , String > >()
144
+ val instantiationTypes = project.objects.mapProperty< String , String >()
144
145
145
146
/* *
146
147
* Sets mappings between OpenAPI spec types and generated code types.
147
148
*/
148
149
@get:Internal
149
- val typeMappings = project.objects.property< Map < String , String > >()
150
+ val typeMappings = project.objects.mapProperty< String , String >()
150
151
151
152
/* *
152
153
* Sets additional properties that can be referenced by the mustache templates in the format of name=value,name=value.
153
154
* You can also have multiple occurrences of this option.
154
155
*/
155
156
@get:Internal
156
- val additionalProperties = project.objects.property< Map < String , String > >()
157
+ val additionalProperties = project.objects.mapProperty< String , String >()
157
158
158
159
/* *
159
160
* Sets server variable for server URL template substitution, in the format of name=value,name=value.
160
161
* You can also have multiple occurrences of this option.
161
162
*/
162
163
@get:Internal
163
- val serverVariables = project.objects.property< Map < String , String > >()
164
+ val serverVariables = project.objects.mapProperty< String , String >()
164
165
165
166
/* *
166
167
* Specifies additional language specific primitive types in the format of type1,type2,type3,type3. For example: String,boolean,Boolean,Double.
@@ -172,7 +173,7 @@ open class GenerateTask : DefaultTask() {
172
173
* Specifies mappings between a given class and the import that should be used for that class.
173
174
*/
174
175
@get:Internal
175
- val importMappings = project.objects.property< Map < String , String > >()
176
+ val importMappings = project.objects.mapProperty< String , String >()
176
177
177
178
/* *
178
179
* Root package for generated code.
@@ -238,7 +239,7 @@ open class GenerateTask : DefaultTask() {
238
239
* Specifies how a reserved name should be escaped to.
239
240
*/
240
241
@get:Internal
241
- val reservedWordsMappings = project.objects.property< Map < String , String > >()
242
+ val reservedWordsMappings = project.objects.mapProperty< String , String >()
242
243
243
244
/* *
244
245
* Specifies an override location for the .openapi-generator-ignore file. Most useful on initial generation.
@@ -372,7 +373,7 @@ open class GenerateTask : DefaultTask() {
372
373
* A dynamic map of options specific to a generator.
373
374
*/
374
375
@get:Internal
375
- val configOptions = project.objects.property< Map < String , String > >()
376
+ val configOptions = project.objects.mapProperty< String , String >()
376
377
377
378
private fun <T : Any ?> Property<T>.ifNotEmpty (block : Property <T >.(T ) -> Unit ) {
378
379
if (isPresent) {
0 commit comments