File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
compiler-plugin/test-fixtures/org/jetbrains/kotlin/compiler/plugin/template Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package org.jetbrains.kotlin.compiler.plugin.template.runners
22
33import org.jetbrains.kotlin.compiler.plugin.template.services.ExtensionRegistrarConfigurator
44import org.jetbrains.kotlin.compiler.plugin.template.services.PluginAnnotationsProvider
5+ import org.jetbrains.kotlin.compiler.plugin.template.services.PluginRuntimeAnnotationsProvider
56import org.jetbrains.kotlin.test.FirParser
67import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
78import org.jetbrains.kotlin.test.directives.CodegenTestDirectives
@@ -43,6 +44,8 @@ open class AbstractJvmBoxTest : AbstractFirBlackBoxCodegenTestBase(FirParser.Lig
4344 ::PluginAnnotationsProvider ,
4445 ::ExtensionRegistrarConfigurator
4546 )
47+
48+ useCustomRuntimeClasspathProviders(::PluginRuntimeAnnotationsProvider )
4649 }
4750 }
4851}
Original file line number Diff line number Diff line change 11package org.jetbrains.kotlin.compiler.plugin.template.services
22
3- import org.jetbrains.kotlin.cli.jvm.config.addJvmClasspathRoot
3+ import org.jetbrains.kotlin.cli.jvm.config.addJvmClasspathRoots
44import org.jetbrains.kotlin.config.CompilerConfiguration
55import org.jetbrains.kotlin.test.model.TestModule
66import org.jetbrains.kotlin.test.services.EnvironmentConfigurator
7+ import org.jetbrains.kotlin.test.services.RuntimeClasspathProvider
78import org.jetbrains.kotlin.test.services.TestServices
89import java.io.File
910
1011class PluginAnnotationsProvider (testServices : TestServices ) : EnvironmentConfigurator(testServices) {
1112 companion object {
12- private val annotationsRuntimeClasspath =
13+ val annotationsRuntimeClasspath =
1314 System .getProperty(" annotationsRuntime.classpath" )?.split(File .pathSeparator)?.map(::File )
1415 ? : error(" Unable to get a valid classpath from 'annotationsRuntime.classpath' property" )
1516 }
1617
1718 override fun configureCompilerConfiguration (configuration : CompilerConfiguration , module : TestModule ) {
18- for (file in annotationsRuntimeClasspath) {
19- configuration.addJvmClasspathRoot(file)
20- }
19+ configuration.addJvmClasspathRoots(annotationsRuntimeClasspath)
2120 }
2221}
22+
23+ class PluginRuntimeAnnotationsProvider (testServices : TestServices ) : RuntimeClasspathProvider(testServices) {
24+ override fun runtimeClassPaths (module : TestModule ) = PluginAnnotationsProvider .annotationsRuntimeClasspath
25+ }
You can’t perform that action at this time.
0 commit comments