File tree Expand file tree Collapse file tree 4 files changed +10
-5
lines changed
core/src/main/kotlin/com/tschuchort/compiletesting
src/main/kotlin/com/tschuchort/compiletesting Expand file tree Collapse file tree 4 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
1
buildscript {
2
- ext. kotlin_version = ' 1.8.0 '
3
- ext. embedded_kotlin_version = ' 1.8.0 '
2
+ ext. kotlin_version = ' 1.9.10 '
3
+ ext. embedded_kotlin_version = ' 1.9.10 '
4
4
5
5
repositories {
6
6
mavenCentral()
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package com.tschuchort.compiletesting
3
3
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
4
4
import org.jetbrains.kotlin.cli.js.K2JSCompiler
5
5
import java.io.*
6
+ import java.nio.file.Paths
7
+ import kotlin.io.path.nameWithoutExtension
6
8
7
9
@Suppress(" MemberVisibilityCanBePrivate" )
8
10
class KotlinJsCompilation : AbstractKotlinCompilation <K2JSCompilerArguments >() {
@@ -79,7 +81,8 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
79
81
args.noStdlib = true
80
82
81
83
args.moduleKind = " commonjs"
82
- args.outputFile = File (outputDir, outputFileName).absolutePath
84
+ args.outputDir = outputDir.absolutePath // -ir-output-dir
85
+ args.moduleName = Paths .get(outputFileName).nameWithoutExtension // -ir-output-name
83
86
args.sourceMapBaseDirs = jsClasspath().joinToString(separator = File .pathSeparator)
84
87
args.libraries = listOfNotNull(kotlinStdLibJsJar).joinToString(separator = " :" )
85
88
@@ -91,7 +94,7 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
91
94
args.irOnly = irOnly
92
95
args.irModuleName = irModuleName
93
96
args.generateDts = generateDts
94
- args.useDeprecatedLegacyCompiler = useDeprecatedLegacyCompiler
97
+ args.forceDeprecatedLegacyCompilerUsage = useDeprecatedLegacyCompiler
95
98
}
96
99
97
100
/* * Runs the compilation task */
Original file line number Diff line number Diff line change 1
1
buildscript {
2
- ext. ksp_version = ' 1.8.0 -1.0.8 '
2
+ ext. ksp_version = ' 1.9.10 -1.0.13 '
3
3
}
4
4
5
5
dependencies {
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import org.jetbrains.kotlin.com.intellij.psi.PsiTreeChangeAdapter
20
20
import org.jetbrains.kotlin.com.intellij.psi.PsiTreeChangeListener
21
21
import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
22
22
import org.jetbrains.kotlin.config.CompilerConfiguration
23
+ import org.jetbrains.kotlin.config.languageVersionSettings
23
24
import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension
24
25
import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
25
26
import java.io.File
@@ -193,6 +194,7 @@ private class KspCompileTestingComponentRegistrar(
193
194
it.deleteRecursively()
194
195
it.mkdirs()
195
196
}
197
+ this .languageVersionSettings = configuration.languageVersionSettings
196
198
configuration[CLIConfigurationKeys .CONTENT_ROOTS ]
197
199
?.filterIsInstance<JavaSourceRoot >()
198
200
?.forEach {
You can’t perform that action at this time.
0 commit comments