{"id":21899030,"url":"https://github.com/johnsonlee/codegen","last_synced_at":"2025-04-15T18:53:17.694Z","repository":{"id":44426039,"uuid":"474651083","full_name":"johnsonlee/codegen","owner":"johnsonlee","description":"A Lightweight Framework for Code Generating","archived":false,"fork":false,"pushed_at":"2022-06-20T09:34:47.000Z","size":126,"stargazers_count":60,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T23:51:11.908Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnsonlee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-27T13:48:27.000Z","updated_at":"2025-03-25T07:42:46.000Z","dependencies_parsed_at":"2022-08-23T20:30:59.840Z","dependency_job_id":null,"html_url":"https://github.com/johnsonlee/codegen","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"johnsonlee/gradle-kotlin-dsl-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonlee%2Fcodegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonlee%2Fcodegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonlee%2Fcodegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnsonlee%2Fcodegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnsonlee","download_url":"https://codeload.github.com/johnsonlee/codegen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249135761,"owners_count":21218365,"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":[],"created_at":"2024-11-28T14:37:02.482Z","updated_at":"2025-04-15T18:53:17.653Z","avatar_url":"https://github.com/johnsonlee.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codegen\n\nA lightweight framework for code generating.\n\n## Why Codegen?\n\nIn Java/Kotlin world, engineers usually use [JavaPoet](https://github.com/square/javapoet) or [KotlinPoet](https://github.com/square/kotlinpoet) for code generating, those tool libraries are really cool, but it increases code maintainability, using [JavaPoet](https://github.com/square/javapoet) or [KotlinPoet](https://github.com/square/kotlinpoet) to generate Java/Kotlin source code like using JSP languages to write a web page, you never know what you have written after a few months.\n\nCodegen separates the generating logic into template and data model, it a little bit like SSR (Server Side Rendering), and provides the well-known template engines integration, e.g. [Mustache](https://mustache.github.io/), [Velocity](https://velocity.apache.org/), it also supports custom template engine.\n\n## Example\n\nSee the example of [AutoFactoryCodegen.kt](./example/src/main/kotlin/io/johnsonlee/codegen/example/AutoFactoryCodegen.kt)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsonlee%2Fcodegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnsonlee%2Fcodegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnsonlee%2Fcodegen/lists"}