Vram Voskanyan
Mar 25, 2024

--

I also tested the 1.0.3 version, and the proper way to always get the same data is:

KSP config:

ksp { arg("prevgen.mode", "PREDICTABLE_MODE") }

The data will be the same for all types. Here is an example of the data.

`

val testClassSimplePreview = TestClassSimple(

stringName = "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",

intAge = 13456,

boolean = true,

longDate = 123456789,

)

`

If you find time, could you check out the

Repo main branch? The test part adds your POJO and prints the test file.

here:

https://github.com/Vram-Voskanyan/PrevGen/blob/main/app/src/androidTest/java/am/vram/demoapplication/PrevGenTest.kt

--

--

Vram Voskanyan

Principal Android Developer with 10+ years of experience, specializing in Performance, Architecture, and Quality.