diff --git a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/AbstractParcelBoxTest.kt b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/AbstractParcelBoxTest.kt index a6c81561072..be080254098 100644 --- a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/AbstractParcelBoxTest.kt +++ b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/AbstractParcelBoxTest.kt @@ -33,8 +33,18 @@ abstract class AbstractParcelBoxTest : CodegenTestCase() { ?: throw RuntimeException("Unable to get a valid path from 'ideaSdk.androidPlugin.path' property, please point it to the Idea android plugin location") } - val layoutlibJar: File by lazy { File(androidPluginPath, "layoutlib-26.5.0.2.jar") } - val layoutlibApiJar: File by lazy { File(androidPluginPath, "layoutlib-api-26.5.0.jar") } + val layoutlibJar: File by lazy { + File(androidPluginPath).listFiles { _, name -> + name.startsWith("layoutlib-") && name.endsWith(".jar") + && !name.startsWith("layoutlib-api-") && !name.startsWith("layoutlib-loader") + }?.firstOrNull() ?: error("Unable to locate layoutlib jar in '$androidPluginPath'") + } + + val layoutlibApiJar: File by lazy { + File(androidPluginPath).listFiles { _, name -> + name.startsWith("layoutlib-api-") && name.endsWith(".jar") + }?.firstOrNull() ?: error("Unable to locate layoutlib-api jar in '$androidPluginPath'") + } private val JUNIT_GENERATED_TEST_CLASS_BYTES by lazy { constructSyntheticTestClass() } private const val JUNIT_GENERATED_TEST_CLASS_FQNAME = "test.JunitTest"