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 11buildscript {
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 '
44
55 repositories {
66 mavenCentral()
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package com.tschuchort.compiletesting
33import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
44import org.jetbrains.kotlin.cli.js.K2JSCompiler
55import java.io.*
6+ import java.nio.file.Paths
7+ import kotlin.io.path.nameWithoutExtension
68
79@Suppress(" MemberVisibilityCanBePrivate" )
810class KotlinJsCompilation : AbstractKotlinCompilation <K2JSCompilerArguments >() {
@@ -79,7 +81,8 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
7981 args.noStdlib = true
8082
8183 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
8386 args.sourceMapBaseDirs = jsClasspath().joinToString(separator = File .pathSeparator)
8487 args.libraries = listOfNotNull(kotlinStdLibJsJar).joinToString(separator = " :" )
8588
@@ -91,7 +94,7 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
9194 args.irOnly = irOnly
9295 args.irModuleName = irModuleName
9396 args.generateDts = generateDts
94- args.useDeprecatedLegacyCompiler = useDeprecatedLegacyCompiler
97+ args.forceDeprecatedLegacyCompilerUsage = useDeprecatedLegacyCompiler
9598 }
9699
97100 /* * Runs the compilation task */
Original file line number Diff line number Diff line change 11buildscript {
2- ext. ksp_version = ' 1.8.0 -1.0.8 '
2+ ext. ksp_version = ' 1.9.10 -1.0.13 '
33}
44
55dependencies {
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import org.jetbrains.kotlin.com.intellij.psi.PsiTreeChangeAdapter
2020import org.jetbrains.kotlin.com.intellij.psi.PsiTreeChangeListener
2121import org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
2222import org.jetbrains.kotlin.config.CompilerConfiguration
23+ import org.jetbrains.kotlin.config.languageVersionSettings
2324import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension
2425import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
2526import java.io.File
@@ -193,6 +194,7 @@ private class KspCompileTestingComponentRegistrar(
193194 it.deleteRecursively()
194195 it.mkdirs()
195196 }
197+ this .languageVersionSettings = configuration.languageVersionSettings
196198 configuration[CLIConfigurationKeys .CONTENT_ROOTS ]
197199 ?.filterIsInstance<JavaSourceRoot >()
198200 ?.forEach {
You can’t perform that action at this time.
0 commit comments