Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.seriabov:Fakeit:v0.1'
}
dependencies {
implementation("com.github.seriabov:Fakeit:v0.1")
}
<dependency>
<groupId>com.github.seriabov</groupId>
<artifactId>Fakeit</artifactId>
<version>v0.1</version>
</dependency>
libraryDependencies += "com.github.seriabov" % "Fakeit" % "v0.1"
:dependencies [[com.github.seriabov/Fakeit "v0.1"]]
This library is a port of the Ruby gem Faker. It generates realistic fake data — like names, emails, dates, countries — to be used in your Android development environment. It can be used in a variety of scenarios, including automated testing and database population.
Maven
<dependency>
<groupId>com.github.moove-it</groupId>
<artifactId>fakeit</artifactId>
<version>v0.2</version>
</dependency>
or Gradle:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.moove-it:fakeit:v0.2'
}
Fakeit can be used in Java and Kotlin Android apps. Run the sample app to check all the available models and generate some random values.
First you need to initialize Fakeit:
// Default locale is en
Fakeit.init(context)
// Or you can pass a Locale o a String locale
Fakeit.init(context, locale)
And then, call the methods like this:
Fakeit.name().lastName()
Fakeit.business().type()
Fakeit.address().city()
Fakeit.card().name()
This is the current list of fake data models available:
For bug reports and feature requests, use Github issue tracker
See the contribution guide.
Fakeit is maintained by © Moove-it