@@ -92,6 +92,7 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
92
92
var noParamAssertions: Boolean = false
93
93
94
94
/* * Generate nullability assertions for non-null Java expressions */
95
+ @Deprecated(" Removed in latest Kotlin version" )
95
96
var strictJavaNullabilityAssertions: Boolean? = null
96
97
97
98
/* * Disable optimizations */
@@ -103,6 +104,7 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
103
104
*
104
105
* {disable|enable}
105
106
*/
107
+ @Deprecated(" Removed in latest Kotlin version" )
106
108
var constructorCallNormalizationMode: String? = null
107
109
108
110
/* * Assert calls behaviour {always-enable|always-disable|jvm|legacy} */
@@ -118,7 +120,8 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
118
120
var useTypeTable: Boolean = false
119
121
120
122
/* * Allow Kotlin runtime libraries of incompatible versions in the classpath */
121
- var skipRuntimeVersionCheck: Boolean = false
123
+ @Deprecated(" Removed in latest Kotlin version" )
124
+ var skipRuntimeVersionCheck: Boolean? = null
122
125
123
126
/* * Path to JSON file to dump Java to Kotlin declaration mappings */
124
127
var declarationsOutputPath: File ? = null
@@ -145,7 +148,8 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
145
148
var supportCompatqualCheckerFrameworkAnnotations: String? = null
146
149
147
150
/* * Do not throw NPE on explicit 'equals' call for null receiver of platform boxed primitive type */
148
- var noExceptionOnExplicitEqualsForBoxedNull: Boolean = false
151
+ @Deprecated(" Removed in latest Kotlin version" )
152
+ var noExceptionOnExplicitEqualsForBoxedNull: Boolean? = null
149
153
150
154
/* * Allow to use '@JvmDefault' annotation for JVM default method support.
151
155
* {disable|enable|compatibility}
@@ -328,13 +332,17 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
328
332
args.noCallAssertions = noCallAssertions
329
333
args.noParamAssertions = noParamAssertions
330
334
args.noReceiverAssertions = noReceiverAssertions
331
- strictJavaNullabilityAssertions?.let {
332
- args.strictJavaNullabilityAssertions = it
333
- }
335
+
336
+ // TODO: Remove after kotlin 1.6.30
337
+ if (strictJavaNullabilityAssertions != null )
338
+ args.trySetDeprecatedOption(" strictJavaNullabilityAssertions" , strictJavaNullabilityAssertions)
339
+
334
340
args.noOptimize = noOptimize
335
341
342
+ // TODO: Remove after kotlin 1.6.30
336
343
if (constructorCallNormalizationMode != null )
337
- args.constructorCallNormalizationMode = constructorCallNormalizationMode
344
+ args.trySetDeprecatedOption(" constructorCallNormalizationMode" , constructorCallNormalizationMode)
345
+
338
346
339
347
if (assertionsMode != null )
340
348
args.assertionsMode = assertionsMode
@@ -366,8 +374,14 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
366
374
if (scriptResolverEnvironment.isNotEmpty())
367
375
args.scriptResolverEnvironment = scriptResolverEnvironment.map { (key, value) -> " $key =\" $value \" " }.toTypedArray()
368
376
369
- args.noExceptionOnExplicitEqualsForBoxedNull = noExceptionOnExplicitEqualsForBoxedNull
370
- args.skipRuntimeVersionCheck = skipRuntimeVersionCheck
377
+ // TODO: Remove after kotlin 1.6.30
378
+ if (noExceptionOnExplicitEqualsForBoxedNull != null )
379
+ args.trySetDeprecatedOption(" noExceptionOnExplicitEqualsForBoxedNull" , noExceptionOnExplicitEqualsForBoxedNull)
380
+
381
+ // TODO: Remove after kotlin 1.6.30
382
+ if (skipRuntimeVersionCheck != null )
383
+ args.trySetDeprecatedOption(" skipRuntimeVersionCheck" , skipRuntimeVersionCheck)
384
+
371
385
args.javaPackagePrefix = javaPackagePrefix
372
386
args.suppressMissingBuiltinsError = suppressMissingBuiltinsError
373
387
}
0 commit comments