Skip to content

Commit c421822

Browse files
committed
Add languageVersion option
1 parent 4547f3d commit c421822

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ abstract class AbstractKotlinCompilation<A : CommonCompilerArguments> internal c
8383
/** Report on performance of the compilation */
8484
var reportPerformance: Boolean = false
8585

86+
var languageVersion: String? = null
8687

8788
/** Additional string arguments to the Kotlin compiler */
8889
var kotlincArguments: List<String> = emptyList()
@@ -112,6 +113,9 @@ abstract class AbstractKotlinCompilation<A : CommonCompilerArguments> internal c
112113
args.reportOutputFiles = reportOutputFiles
113114
args.reportPerf = reportPerformance
114115

116+
if (languageVersion != null)
117+
args.languageVersion = this.languageVersion
118+
115119
configuration(args)
116120

117121
/**

0 commit comments

Comments
 (0)