{"id":29278015,"url":"https://github.com/ltttttttttttt/virtualreflection","last_synced_at":"2025-07-05T10:04:14.434Z","repository":{"id":143199493,"uuid":"608470218","full_name":"ltttttttttttt/VirtualReflection","owner":"ltttttttttttt","description":"Virtual reflection of KMP","archived":false,"fork":false,"pushed_at":"2025-06-29T14:57:47.000Z","size":599,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-29T15:37:04.789Z","etag":null,"topics":["ios","jvm","kmm","kmp","kotlin","kotlin-js","kotlin-jvm","kotlin-native","reflection","virtual-reflection","web"],"latest_commit_sha":null,"homepage":"","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/ltttttttttttt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-02T04:34:49.000Z","updated_at":"2025-06-29T14:57:51.000Z","dependencies_parsed_at":"2025-06-29T15:29:44.685Z","dependency_job_id":"302c6315-68fd-4d3d-a155-5ad882a56625","html_url":"https://github.com/ltttttttttttt/VirtualReflection","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/ltttttttttttt/VirtualReflection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltttttttttttt%2FVirtualReflection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltttttttttttt%2FVirtualReflection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltttttttttttt%2FVirtualReflection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltttttttttttt%2FVirtualReflection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ltttttttttttt","download_url":"https://codeload.github.com/ltttttttttttt/VirtualReflection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ltttttttttttt%2FVirtualReflection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263723227,"owners_count":23501500,"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":["ios","jvm","kmm","kmp","kotlin","kotlin-js","kotlin-jvm","kotlin-native","reflection","virtual-reflection","web"],"created_at":"2025-07-05T10:04:13.637Z","updated_at":"2025-07-05T10:04:14.429Z","avatar_url":"https://github.com/ltttttttttttt.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eVirtualReflection\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eVirtual reflection of Kotlin all target\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/Kotlin-Multiplatform-%237f52ff?logo=kotlin\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/license-Apache%202-blue.svg?maxAge=2592000\"\u003e\n\u003cimg src=\"https://img.shields.io/maven-central/v/io.github.ltttttttttttt/VirtualReflection\"/\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003eus English | \u003ca href=\"https://github.com/ltttttttttttt/VirtualReflection/blob/main/README_CN.md\"\u003ecn 简体中文\u003c/a\u003e\u003c/div\u003e\n\n## ability\n\n1. Set all classes in certain packages to support virtual reflection\n2. Mark certain classes that can or cannot be virtually reflected through annotations\n\n## How to use\n\nStep 1.Your app dir, build.gradle.kts add:\n\nversion\n= [![](https://img.shields.io/maven-central/v/io.github.ltttttttttttt/VirtualReflection)](https://repo1.maven.org/maven2/io/github/ltttttttttttt/VirtualReflection/)\n\n* If it is a single platform, add it to build.gradle.kts in the app module directory\n\n```kotlin\nplugins {\n    ...\n    id(\"com.google.devtools.ksp\") version \"1.7.10-1.0.6\"//this, The left 1.7.10 corresponds to your the Kotlin version,more version: https://github.com/google/ksp/releases\n}\n//The fourth step of configuring ksp to generate directory reference links: https://github.com/ltttttttttttt/Buff/blob/main/README.md\ndependencies {\n    ...\n    implementation(\"io.github.ltttttttttttt:VirtualReflection-lib:$version\")//this, such as 1.2.1\n    ksp(\"io.github.ltttttttttttt:VirtualReflection:$version\")//this, such as 1.2.1\n}\n```\n\n* If it is multi-platform, add it to build.gradle.kts in the common module directory\n\n```kotlin\nplugins {\n    ...\n    id(\"com.google.devtools.ksp\") version \"1.7.10-1.0.6\"\n}\n...\nval commonMain by getting {\n    //Configure the ksp generation directory\n    kotlin.srcDir(\"build/generated/ksp/metadata/commonMain/kotlin\")\n    dependencies {\n        ...\n        api(\"io.github.ltttttttttttt:VirtualReflection-lib:$version\")//this, such as 1.2.1\n    }\n}\n\n...\ndependencies {\n    add(\"kspCommonMainMetadata\", \"io.github.ltttttttttttt:VirtualReflection:$version\")//this, such as 1.2.1\n}\n```\n\nStep 2.Use VirtualReflection\n\nConfigure packages that require virtual reflection, Your app dir, build.gradle.kts -\u003e android(or kotlin) add:\n\n```kotlin\nksp {\n    //Configure multiple paths separated by spaces\n    arg(\"packageListWithVirtualReflection\", \"com.lt.virtual_reflection.bean/*your package*/\")\n    //Configure the generated function name, which defaults to newInstance\n    //arg(\"functionNameWithVirtualReflection\", xxx)\n}\n```\n\nuse\n\n```kotlin\n//Constructing Objects Using Non parametric Constructors\nKClass.newInstance()\n//Constructing Objects Using Parametric Constructors\nKClass.newInstance(parameters...)\n//By string method\nVirtualReflectionUtil.newInstance(\"MainActivity\")\n//Additional configuration of classes or files that can be virtually reflected\n@ReflectionObject\n//Configure the constructor within the path to not support virtual reflection\n@NotReflectionObjectConstructor\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltttttttttttt%2Fvirtualreflection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fltttttttttttt%2Fvirtualreflection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fltttttttttttt%2Fvirtualreflection/lists"}