[Test] Introduce provider of path of standard libraries jars

Before this change all paths to all libraries were hardcoded to
  `dist/kotlinc/lib/...`, which is not suitable for usages of test
  framework outside of Kotlin project
This commit is contained in:
Dmitriy Novozhilov
2022-04-07 16:11:01 +04:00
committed by teamcity
parent 648a3667e0
commit 2c6aea47b1
7 changed files with 158 additions and 31 deletions
@@ -416,6 +416,7 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager
assertions = JUnit5Assertions
useAdditionalService<TemporaryDirectoryManager>(::TemporaryDirectoryManagerImpl)
useAdditionalService<ApplicationDisposableProvider> { ExecutionListenerBasedDisposableProvider() }
useAdditionalService<KotlinStandardLibrariesPathProvider> { StandardLibrariesPathProviderForKotlinProject }
useSourcePreprocessor(*AbstractKotlinCompilerTest.defaultPreprocessors.toTypedArray())
useDirectives(*AbstractKotlinCompilerTest.defaultDirectiveContainers.toTypedArray())
class AndroidTransformingPreprocessor(testServices: TestServices) : SourceFilePreprocessor(testServices) {