escodro
03/03/2021, 6:45 PM--debug
it only gives me the default:
Execution failed for task ':app:kaptDebugAndroidTestKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)
I’m migrating from Koin to Hilt but this is blocking me once I want to do some end to end tests in my application.
Thanks a lot in advance! ❤️escodro
03/03/2021, 6:49 PM@HiltAndroidTest
internal class HomeScreenTest {
@get:Rule
val composeTestRule = createComposeRule()
@get:Rule
var hiltRule = HiltAndroidRule(this)
private val context = InstrumentationRegistry.getInstrumentation().targetContext
@Before
fun setup() {
composeTestRule.setContent {
NavGraph()
}
}
Custom runner on build.gradle
android {
defaultConfig {
...
testInstrumentationRunner "com.escodro.alkaa.CustomTestRunner"
}
build.gradle
androidTestImplementation (Deps.hilt.android){
exclude group: "androidx.fragment", module: "fragment"
exclude group: "androidx.lifecycle", module: "lifecycle-runtime"
exclude group: "androidx.lifecycle", module: "lifecycle-livedata-core"
}
androidTestImplementation Deps.test.runner
kaptAndroidTest Deps.hilt.compiler
wasyl
03/03/2021, 7:03 PM--stacktrace
, this may give you some more specific errorescodro
03/03/2021, 7:19 PM--stacktrace
, --debug
, `--info`… The only way to see more helpful logs is removing the kaptAndroidTest Deps.hilt.compiler
dependency, which does not help a lot.allan.conda
03/04/2021, 3:24 AMCustomTestRunner
escodro
03/04/2021, 11:06 AMallan.conda
03/04/2021, 11:10 AMallan.conda
03/04/2021, 11:12 AMescodro
03/04/2021, 12:09 PMtrevjones
03/04/2021, 8:49 PM-Dkotlin.compiler.execution.strategy="in-process"
escodro
03/05/2021, 10:52 AM