Skip to content

Commit 9e368f2

Browse files
authored
Switch to jvmDefaultStable for jvm default setting (#390)
1 parent b54e319 commit 9e368f2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Changelog
44
**Unreleased**
55
--------------
66

7+
- **Fix:** Don't set `jvmDefault` automatically (previously defaulted to `JvmDefaultMode.DISABLE`).
8+
- **Fix:** Use the new, non-deprecated `jvmDefaultStable` CLI option when setting `jvmDefault`.
9+
710
0.10.0
811
-----
912

core/src/main/kotlin/com/tschuchort/compiletesting/KotlinCompilation.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
163163
* Allow to use '@JvmDefault' annotation for JVM default method support.
164164
* {disable|enable|compatibility}
165165
*/
166-
var jvmDefault: String = JvmDefaultMode.DISABLE.description
166+
var jvmDefault: String? = null
167167

168168
/** Generate metadata with strict version semantics (see kdoc on Metadata.extraInt) */
169169
var strictMetadataVersionSemantics: Boolean = false
@@ -310,7 +310,7 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
310310
args.supportCompatqualCheckerFrameworkAnnotations =
311311
supportCompatqualCheckerFrameworkAnnotations
312312

313-
args.jvmDefault = jvmDefault
313+
args.jvmDefaultStable = jvmDefault
314314
args.strictMetadataVersionSemantics = strictMetadataVersionSemantics
315315
args.sanitizeParentheses = sanitizeParentheses
316316

0 commit comments

Comments
 (0)