kotlin-faker 2.0 - Breaking Changes #236
Replies: 3 comments
-
Versioning ChangesFrom 637498b (release
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Kotlin 2.0 support
|
Beta Was this translation helpful? Give feedback.
-
This issue describes breaking changes that are coming in the next major version of kotlin-faker for easier migration.
Multi-Faker Implementation
Currently, the most notable change is described in #217 and implemented in #219 , which can break compilation for many calls to
Faker
.In short, if you've been using a lot of different data providers from
Faker
, it is likely that some of them won't be there anymore in the "core faker" implementation. This includes data providers in the domains like books, tv shows, movies, music, sports and many others.To keep using those, you will need to add one or more extra fakers via new dependencies and fix the imports and add new faker objects to access those providers.
Below is the list of all available fakers' dependencies (note that the default faker is needed for others to work as they won't pull it as a transitive dependency):
If you have been using
faker {}
dsl function to create instances ofFaker
, each faker implementation also has such a function with the same name. Mind the package names though if using multiple ones in the same file.Below is a simple example of using all the available fakers:
Note
More details on the new Data Providers structure can be found in the docs
Beta Was this translation helpful? Give feedback.
All reactions