{"id":22043132,"url":"https://github.com/eranboudjnah/randomgenkt","last_synced_at":"2025-05-08T01:23:01.559Z","repository":{"id":50538199,"uuid":"154015466","full_name":"EranBoudjnah/RandomGenKt","owner":"EranBoudjnah","description":"Kotlin port of RandomGen","archived":false,"fork":false,"pushed_at":"2025-05-07T09:49:50.000Z","size":6167,"stargazers_count":38,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T10:43:00.726Z","etag":null,"topics":["demo","generator","kotlin","random","random-generation","random-generator","randomgenerator","reflection"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EranBoudjnah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"EranBoudjnah","custom":"https://paypal.me/EranB"}},"created_at":"2018-10-21T14:10:20.000Z","updated_at":"2025-05-07T09:49:53.000Z","dependencies_parsed_at":"2024-02-15T18:33:50.546Z","dependency_job_id":"e776dd0c-d7ee-47bb-b28b-b1eb935b6425","html_url":"https://github.com/EranBoudjnah/RandomGenKt","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FRandomGenKt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FRandomGenKt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FRandomGenKt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FRandomGenKt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EranBoudjnah","download_url":"https://codeload.github.com/EranBoudjnah/RandomGenKt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252979619,"owners_count":21835091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["demo","generator","kotlin","random","random-generation","random-generator","randomgenerator","reflection"],"created_at":"2024-11-30T12:15:09.714Z","updated_at":"2025-05-08T01:23:01.535Z","avatar_url":"https://github.com/EranBoudjnah.png","language":"Kotlin","funding_links":["https://github.com/sponsors/EranBoudjnah","https://paypal.me/EranB"],"categories":[],"sub_categories":[],"readme":"# RandomGenKt\n\u003e\n\u003e Initialize instances of any class with generated data.\n\u003e\n\n[![Version - RandomGenKt](https://img.shields.io/maven-central/v/com.mitteloupe.randomgenkt/randomgenkt?label=RandomGenKt+|+MavenCentral)](https://mvnrepository.com/artifact/com.mitteloupe.randomgenkt/randomgenkt)\n[![Version - DataSource](https://img.shields.io/maven-central/v/com.mitteloupe.randomgenkt/randomgenkt.datasource?label=datasource+|+MavenCentral)](https://mvnrepository.com/artifact/com.mitteloupe.randomgenkt/randomgenkt.datasource)\n![Build Status](https://img.shields.io/github/actions/workflow/status/EranBoudjnah/RandomGenKt/gradle-checks.yml)\n[![License](https://img.shields.io/github/license/EranBoudjnah/RandomGenKt)](https://github.com/EranBoudjnah/RandomGenKt/blob/master/LICENSE)\n\n![Example](https://github.com/EranBoudjnah/RandomGenKt/raw/master/example/videocap.gif)\n\nThis is a Kotlin port of the Java library designed to generate random instances of any class.\n\nThis is great for demoing your app with interesting content, manually testing it with varying data, and even populating it with smart, random generated data in production.\n\n## Install\n\nIn your `build.gradle`, add the following:\n\n```groovy\ndependencies {\n    implementation(\"com.mitteloupe.randomgenkt:randomgenkt:2.0.1\")\n}\n```\n\nTo include the default data generators, also include\n```groovy\ndependencies {\n    implementation(\"com.mitteloupe.randomgenkt:randomgenkt.datasource:2.0.1\")\n}\n```\n\n## Usage\n\n### Kotlin\n```kotlin\nval randomGen = RandomGen.Builder\u003cObjectClass\u003e()\n\t.ofKotlinClass\u003cObjectClass\u003e()\n\t.withField(\"id\")\n\t.returningSequentialInteger()\n\t.withField(\"uuid\")\n\t.returningUuid()\n\t.build()\n```\n\n### Java\n```java\nRandomGen\u003cObjectClass\u003e randomGen = new RandomGen.Builder\u003cObjectClass\u003e()\n\t.ofJavaClass(ObjectClass.class)\n\t.withField(\"id\")\n\t.returningSequentialInteger()\n\t.withField(\"uuid\")\n\t.returningUuid()\n\t.build();\n```\n\nThis will create a `RandomGen` instance producing `ObjectClass` instances with sequential IDs and random UUIDs.\n\nTo use the newly generated `RandomGen`, simply call:\n\n### Kotlin\n```kotlin\nval instance = randomGen()\n```\n\n### Java\n```java\nObjectClass instance = randomGen.invoke();\n```\n\n### What's New?\n\nVersion 2.0\n\nThis is an overhaul of RandomGenKt. It has been dusted, polished and refactored to align with modern conventions.\n\n--\n\nThe Kotlin version adds the following:\n\n* Support for fields with lazy init\n* Lambdas\n* `ofClass\u003cType\u003e()` instead of `ofClass(Type::class.java)`\n\n## Created by\n[Eran Boudjnah](https://www.linkedin.com/in/eranboudjnah)\n\n## License\n[MIT](LICENSE) © [Eran Boudjnah](https://www.linkedin.com/in/eranboudjnah)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feranboudjnah%2Frandomgenkt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feranboudjnah%2Frandomgenkt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feranboudjnah%2Frandomgenkt/lists"}