{"id":15651045,"url":"https://github.com/izhangzhihao/unmeta","last_synced_at":"2025-08-21T09:32:34.735Z","repository":{"id":61919347,"uuid":"554105602","full_name":"izhangzhihao/unmeta","owner":"izhangzhihao","description":"remove all Kotlin Metadata and DebugMetadata annotations from .class files","archived":false,"fork":false,"pushed_at":"2024-08-09T15:19:04.000Z","size":148,"stargazers_count":43,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-10T21:11:30.336Z","etag":null,"topics":["gradle","gradle-plugin","kotlin","kotlin-plugin","metadata","obfuscation","proguard","r8"],"latest_commit_sha":null,"homepage":"https://plugins.gradle.org/plugin/io.github.izhangzhihao.unmeta","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/izhangzhihao.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}},"created_at":"2022-10-19T09:00:09.000Z","updated_at":"2024-12-07T14:40:43.000Z","dependencies_parsed_at":"2024-08-09T16:28:43.616Z","dependency_job_id":"32c1aa41-1424-4f8b-9ea4-f0cb2017e82c","html_url":"https://github.com/izhangzhihao/unmeta","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"cortinico/kotlin-gradle-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izhangzhihao%2Funmeta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izhangzhihao%2Funmeta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izhangzhihao%2Funmeta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/izhangzhihao%2Funmeta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/izhangzhihao","download_url":"https://codeload.github.com/izhangzhihao/unmeta/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230507049,"owners_count":18236944,"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":["gradle","gradle-plugin","kotlin","kotlin-plugin","metadata","obfuscation","proguard","r8"],"created_at":"2024-10-03T12:36:46.465Z","updated_at":"2024-12-19T22:07:18.114Z","avatar_url":"https://github.com/izhangzhihao.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unmeta Kotlin gradle plugin 🐘\n\nA Gradle plugin to remove all Kotlin @Metadata / @DebugMetadata / @SourceDebugExtension annotations from the compile output and jars.\n\nKotlin @Metadata and @DebugMetadata annotations are not fully processed by ProGuard / R8 and contain un-obfuscated symbol information, both in binary and plain text forms. This information can be used to more easily reverse engineer your code.\n\nThis plugin allows removing all Kotlin @Metadata / @DebugMetadata / @SourceDebugExtension annotations from generated class files. This is safe to do as long as:\n\n* you do not intend to use the resulting binaries as a Kotlin library (@Metadata annotations are used to determine Kotlin function definitions),\n* you are not using Kotlin Reflection (certain reflection functionality depends on the presence of the @Metadata annotations).\n\n## By using the Kotlin dsl in `build.gradle.kt`\n\n```kotlin\nplugins {\n    kotlin(\"jvm\")\n    id(\"io.github.izhangzhihao.unmeta\") version \"1.0.3\"\n}\n\nunmeta {\n    enable.set(true)\n}\n```\n\nTo enable the plugin only for release builds add this section:\n\n```kotlin\ngradle.taskGraph.whenReady {\n    if (allTasks.any { it.name.contains(\"release\") }) {\n        unmeta {\n            enable.set(true)\n        }\n    } else {\n        unmeta {\n            enable.set(false)\n        }\n    }\n}\n```\n\n## By using the Groovy dsl in `build.gradle`\n\n```kotlin\nplugins {\n    id 'org.jetbrains.kotlin.jvm' version '1.8.21'\n    id \"io.github.izhangzhihao.unmeta\" version \"1.0.3\"\n}\n\nunmeta {\n    enable.set(true)\n}\n```\n\nTo enable the plugin only for release builds add this section:\n\n```groovy\ngradle.taskGraph.whenReady { graph -\u003e\n    if (graph.getAllTasks().any { it.name.contains(\"release\") }) {\n        unmeta {\n            enable.set(true)\n        }\n    } else {\n        unmeta {\n            enable.set(false)\n        }\n    }\n}\n```\n\n## Verify\n\n```\n./gradlew clean jar --dry-run\n:clean SKIPPED\n:compileKotlin SKIPPED\n:unmeta SKIPPED\n:compileJava SKIPPED\n:processResources SKIPPED\n:classes SKIPPED\n:jar SKIPPED\n```\n\nYou might need this to force the `unmeta` task runs before the `jar` task:\n\n```kotlin\njar {\n    mustRunAfter(\"unmeta\")\n}\n```\n\n## Dependency substitution\n\nPlease note that the project relies on module name/group in order for [dependency substitution](https://docs.gradle.org/current/userguide/resolution_rules.html#sec:dependency_substitution_rules) to work properly. If you change only the plugin ID everything will work as expected. If you change module name/group, things might break and you probably have to specify a [substitution rule](https://docs.gradle.org/current/userguide/resolution_rules.html#sub:project_to_module_substitution).\n\n\n## Contributing 🤝\n\nFeel free to open a issue or submit a pull request for any bugs/improvements.\n\n```bash\n./gradlew --project-dir plugin-build publishToMavenLocal\n```\n\n## License 📄\n\nThis template is licensed under the MIT License - see the [License](License) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizhangzhihao%2Funmeta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fizhangzhihao%2Funmeta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fizhangzhihao%2Funmeta/lists"}