{"id":20662510,"url":"https://github.com/xxdark/better-repeatable","last_synced_at":"2025-04-19T15:51:06.129Z","repository":{"id":170293323,"uuid":"646425142","full_name":"xxDark/better-repeatable","owner":"xxDark","description":"Repeatable annotation","archived":false,"fork":false,"pushed_at":"2023-05-31T08:59:39.000Z","size":115,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T09:41:35.618Z","etag":null,"topics":["annotation","bytecode","java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/xxDark.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":"2023-05-28T11:09:36.000Z","updated_at":"2024-12-24T23:31:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"4737d4fb-315b-4b43-92c7-895c844f4c94","html_url":"https://github.com/xxDark/better-repeatable","commit_stats":null,"previous_names":["xxdark/better-repeatable"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxDark%2Fbetter-repeatable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxDark%2Fbetter-repeatable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxDark%2Fbetter-repeatable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxDark%2Fbetter-repeatable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xxDark","download_url":"https://codeload.github.com/xxDark/better-repeatable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249730656,"owners_count":21317328,"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":["annotation","bytecode","java"],"created_at":"2024-11-16T19:14:25.699Z","updated_at":"2025-04-19T15:51:06.124Z","avatar_url":"https://github.com/xxDark.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# better-repeatable\r\n\r\nEliminates need of using container to group repeatable annotations together.  \r\nOnce the compiler plugin sees any annotation that is marked with `dev.xdark.betterrepeatable.Repetable`, any use of `java.lang.annotation.Repeatable` for the place where the annotation is used (class, field, method) will be ignored and annotations will be dumped as-is, in preserved order.\r\n\r\nPrimary purpose of change made better-repeatable is to be able to read annotations with ASM or any other bytecode framework in order they appear in source code, which is not possible with built-in `@Repeatable` annotation.\r\n\r\n# Getting started\r\nApply Gradle [plugin](https://plugins.gradle.org/plugin/dev.xdark.betterrepeatable):\r\n```groovy\r\nplugins {\r\n  id 'dev.xdark.betterrepeatable' version 'latest_version_here'\r\n}\r\n```\r\nPlugin will automatically include API dependency to `compileOnly` configuration.  \r\nIf you want to disable such behaviour, set `usePluginAsDependency` to `false`:\r\n```groovy\r\nbetterRepeatable {\r\n    usePluginAsDependency = false\r\n}\r\n```\r\n\r\n# Breaking behaviour\r\n\r\nWith better-repeatable changes, built-in Java API to read annotations in places, where there are multiple annotations, will no longer work.  \r\nThis is caused by code in `sun.reflect.AnnotationParser`:\r\n```java\r\nClass\u003c? extends Annotation\u003e klass = a.annotationType();\r\nif (AnnotationType.getInstance(klass).retention() == RetentionPolicy.RUNTIME \u0026\u0026\r\n    result.put(klass, a) != null) {\r\n        throw new AnnotationFormatError(\r\n            \"Duplicate annotation for class: \"+klass+\": \" + a);\r\n    }\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxdark%2Fbetter-repeatable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxxdark%2Fbetter-repeatable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxdark%2Fbetter-repeatable/lists"}