infinum / kotlin-jsonapix

JsonApiX is an Android, annotation processor library that was made to transform regular Kotlin classes into their JSON API representations, with the ability to serialize or deserialize them to or from strings.
Apache License 2.0
38 stars 9 forks source link

Unable find class JsonApiX in instrumental test #43

Closed alireza-milani closed 2 years ago

alireza-milani commented 2 years ago

Hi there again.

I create a android test class and use @HiltAndroidTest to injecting dependencies into this test. but when I run android test, this error is shown
Execution failed for task ':sample:hiltJavaCompileDebugAndroidTest'.

java.lang.NoClassDefFoundError: com/infinum/jsonapix/annotations/JsonApiX

If this problem has a solution, i appreciate say me about that

stjepanbanek commented 2 years ago

You need to add the core dependency as a test implementation.

testImplementation("com.infinum.jsonapix:core:1.0.0-beta01")