Add layout lib system properties so that parcel tests run.
This is for the parcel part of deprecated android extensions. So this will be removed soon, but it is still there and the tests should run.
This commit is contained in:
committed by
Alexander Udalov
parent
ff84c19eff
commit
2d720a09c3
@@ -8,6 +8,8 @@ plugins {
|
||||
|
||||
val robolectricClasspath by configurations.creating
|
||||
val androidExtensionsRuntimeForTests by configurations.creating
|
||||
val layoutLib by configurations.creating
|
||||
val layoutLibApi by configurations.creating
|
||||
|
||||
dependencies {
|
||||
testApi(intellijCore())
|
||||
@@ -42,6 +44,9 @@ dependencies {
|
||||
embedded(project(":kotlin-android-extensions-runtime")) { isTransitive = false }
|
||||
|
||||
androidExtensionsRuntimeForTests(project(":kotlin-android-extensions-runtime")) { isTransitive = false }
|
||||
|
||||
layoutLib("org.jetbrains.intellij.deps.android.tools:layoutlib:26.5.0") { isTransitive = false }
|
||||
layoutLibApi("com.android.tools.layoutlib:layoutlib-api:26.5.0") { isTransitive = false }
|
||||
}
|
||||
|
||||
optInToExperimentalCompilerApi()
|
||||
@@ -74,8 +79,13 @@ projectTest {
|
||||
robolectricClasspath.asPath
|
||||
}
|
||||
|
||||
val layoutLibConf: FileCollection = layoutLib
|
||||
val layoutLibApiConf: FileCollection = layoutLibApi
|
||||
|
||||
doFirst {
|
||||
systemProperty("androidExtensionsRuntime.classpath", androidExtensionsRuntimeProvider.get())
|
||||
systemProperty("robolectric.classpath", robolectricClasspathProvider.get())
|
||||
systemProperty("layoutLib.path", layoutLibConf.singleFile.canonicalPath)
|
||||
systemProperty("layoutLibApi.path", layoutLibApiConf.singleFile.canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user