{"id":15337286,"url":"https://github.com/vy/flatc","last_synced_at":"2025-02-26T07:31:46.491Z","repository":{"id":57729482,"uuid":"45866936","full_name":"vy/flatc","owner":"vy","description":"Unofficial Maven artifacts for FlatBuffers compiler binaries.","archived":false,"fork":false,"pushed_at":"2015-11-09T21:19:39.000Z","size":0,"stargazers_count":2,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-03T13:22:07.153Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/vy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-09T21:09:19.000Z","updated_at":"2017-05-16T07:11:39.000Z","dependencies_parsed_at":"2022-09-11T07:51:53.125Z","dependency_job_id":null,"html_url":"https://github.com/vy/flatc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vy%2Fflatc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vy%2Fflatc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vy%2Fflatc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vy%2Fflatc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vy","download_url":"https://codeload.github.com/vy/flatc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219842851,"owners_count":16556519,"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-10-01T10:20:28.222Z","updated_at":"2024-10-15T18:12:10.932Z","avatar_url":"https://github.com/vy.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"According to the [official FlatBuffers project](https://github.com/google/flatbuffers),\n\n\u003e FlatBuffers is a serialization library for games and other memory\n\u003e constrained apps. FlatBuffers allows you to directly access serialized\n\u003e data without unpacking/parsing it first, while still having great\n\u003e forwards/backwards compatibility.\n\nUnfortunately, FlatBuffers project does not have a native Java compiler.\nThis project provides a set of Maven artifacts containing platform-dependent\n`flatc` binaries. The list of supported platforms are as follows:\n\n- Linux (x86-64)\n- OSX (x86-64)\n\nUsage\n=====\n\nYou can use `flatc` artifacts in your Maven projects to compile your FlatBuffers\nschemas (`*.fbs`) as follows:\n\n1. Add [flatbuffers](http://github.com/vy/flatbuffers) to your\n   dependencies to provide `com.google.flatbuffers` package\n   required by `flatc` generated Java files.\n\n2. Add necessary `flatc` artifact (e.g. `flatc-linux-x86_64`) to your\n   Maven dependencies.\n\n3. Use Maven Ant plugin to execute the `flatc` provided by the artifact.\n\n4. Use `build-helper-maven-plugin` to include generated sources in the\n   final package.\n\nFollowing `pom.xml` snippet shows how you can do these steps in detail.\n(Note that here it purposes `flatc` artifact to compile `*.fbs` files\nunder `src` directory.)\n\n```xml\n\u003cproperties\u003e\n\n    \u003c!-- fbs paths --\u003e\n    \u003cfbs.input.directory\u003esrc\u003c/fbs.input.directory\u003e\n    \u003cfbs.output.directory\u003e${project.build.directory}/generated-sources\u003c/fbs.output.directory\u003e\n\n    \u003c!-- library versions --\u003e\n    \u003cbuild-helper-maven-plugin.version\u003e1.9.1\u003c/build-helper-maven-plugin.version\u003e\n    \u003cfbs.version\u003e1.2.0-3f79e055\u003c/fbs.version\u003e\n    \u003cmaven-antrun-plugin.version\u003e1.8\u003c/maven-antrun-plugin.version\u003e\n    \u003cmaven-compiler-plugin.version\u003e3.3\u003c/maven-compiler-plugin.version\u003e\n    \u003cmaven-dependency-plugin.version\u003e2.10\u003c/maven-dependency-plugin.version\u003e\n    \u003cos-maven-plugin.version\u003e1.4.1.Final\u003c/os-maven-plugin.version\u003e\n\n\u003c/properties\u003e\n\n\u003cdependencies\u003e\n\n    \u003c!-- provides com.google.flatbuffers package --\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.vlkan\u003c/groupId\u003e\n        \u003cartifactId\u003eflatbuffers\u003c/artifactId\u003e\n        \u003cversion\u003e${fbs.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n\n\u003c/dependencies\u003e\n\n\u003cbuild\u003e\n\n    \u003cextensions\u003e\n\n        \u003c!-- provides os.detected.classifier (i.e. linux-x86_64, osx-x86_64) property --\u003e\n        \u003cextension\u003e\n            \u003cgroupId\u003ekr.motd.maven\u003c/groupId\u003e\n            \u003cartifactId\u003eos-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e${os-maven-plugin.version}\u003c/version\u003e\n        \u003c/extension\u003e\n\n    \u003c/extensions\u003e\n\n    \u003cplugins\u003e\n\n        \u003c!-- copy flatc binary into build directory --\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n            \u003cartifactId\u003emaven-dependency-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e${maven-dependency-plugin.version}\u003c/version\u003e\n            \u003cexecutions\u003e\n                \u003cexecution\u003e\n                    \u003cid\u003ecopy-flatc\u003c/id\u003e\n                    \u003cphase\u003egenerate-sources\u003c/phase\u003e\n                    \u003cgoals\u003e\n                        \u003cgoal\u003ecopy\u003c/goal\u003e\n                    \u003c/goals\u003e\n                    \u003cconfiguration\u003e\n                        \u003cartifactItems\u003e\n                            \u003cartifactItem\u003e\n                                \u003cgroupId\u003ecom.vlkan\u003c/groupId\u003e\n                                \u003cartifactId\u003eflatc-${os.detected.classifier}\u003c/artifactId\u003e\n                                \u003cversion\u003e${fbs.version}\u003c/version\u003e\n                                \u003ctype\u003eexe\u003c/type\u003e\n                                \u003coverWrite\u003etrue\u003c/overWrite\u003e\n                                \u003coutputDirectory\u003e${project.build.directory}\u003c/outputDirectory\u003e\n                            \u003c/artifactItem\u003e\n                        \u003c/artifactItems\u003e\n                    \u003c/configuration\u003e\n                \u003c/execution\u003e\n            \u003c/executions\u003e\n        \u003c/plugin\u003e\n\n        \u003c!-- compile fbs files using copied flatc binary --\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n            \u003cartifactId\u003emaven-antrun-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e${maven-antrun-plugin.version}\u003c/version\u003e\n            \u003cexecutions\u003e\n                \u003cexecution\u003e\n                    \u003cid\u003eexec-flatc\u003c/id\u003e\n                    \u003cphase\u003egenerate-sources\u003c/phase\u003e\n                    \u003cconfiguration\u003e\n                        \u003ctasks\u003e\n                            \u003cproperty name=\"flatc.filename\" value=\"flatc-${os.detected.classifier}-${fbs.version}.exe\"/\u003e\n                            \u003cproperty name=\"flatc.filepath\" value=\"${project.build.directory}/${flatc.filename}\"/\u003e\n                            \u003cchmod file=\"${flatc.filepath}\" perm=\"ugo+rx\"/\u003e\n                            \u003cmkdir dir=\"${fbs.output.directory}\" /\u003e\n                            \u003cpath id=\"fbs.path\"\u003e\n                                \u003cfileset dir=\"${fbs.input.directory}\"\u003e\n                                    \u003cinclude name=\"**/*.fbs\"/\u003e\n                                \u003c/fileset\u003e\n                            \u003c/path\u003e\n                            \u003cpathconvert pathsep=\" \" property=\"fbs.files\" refid=\"fbs.path\"/\u003e\n                            \u003cexec executable=\"${flatc.filepath}\" failonerror=\"true\"\u003e\n                                \u003carg value=\"-o\"/\u003e\n                                \u003carg value=\"${fbs.output.directory}\"/\u003e\n                                \u003carg value=\"-I\"/\u003e\n                                \u003carg value=\"${fbs.input.directory}\"/\u003e\n                                \u003carg value=\"-j\"/\u003e\n                                \u003carg line=\"${fbs.files}\"/\u003e\n                            \u003c/exec\u003e\n                        \u003c/tasks\u003e\n                    \u003c/configuration\u003e\n                    \u003cgoals\u003e\n                        \u003cgoal\u003erun\u003c/goal\u003e\n                    \u003c/goals\u003e\n                \u003c/execution\u003e\n            \u003c/executions\u003e\n        \u003c/plugin\u003e\n\n        \u003c!-- add generated flat buffer classes into the package --\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003eorg.codehaus.mojo\u003c/groupId\u003e\n            \u003cartifactId\u003ebuild-helper-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e${build-helper-maven-plugin.version}\u003c/version\u003e\n            \u003cexecutions\u003e\n                \u003cexecution\u003e\n                    \u003cid\u003eadd-classes\u003c/id\u003e\n                    \u003cphase\u003egenerate-sources\u003c/phase\u003e\n                    \u003cgoals\u003e\n                        \u003cgoal\u003eadd-source\u003c/goal\u003e\n                    \u003c/goals\u003e\n                    \u003cconfiguration\u003e\n                        \u003csources\u003e\n                            \u003csource\u003e${fbs.output.directory}\u003c/source\u003e\n                        \u003c/sources\u003e\n                    \u003c/configuration\u003e\n                \u003c/execution\u003e\n            \u003c/executions\u003e\n        \u003c/plugin\u003e\n\n    \u003c/plugins\u003e\n\n\u003c/build\u003e\n```\n\nA Note on Versioning\n====================\n\nOfficial FlatBuffers project does not follow a versioning scheme as\nof this writing. In order to the report the version of the used clone,\nI used the following fields:\n\n- the most recent Java API version (1.2.0-SNAPSHOT)\n- the first 8 digits of the clone's last commit I had used to compile the binaries\n\nLicense\n=======\n\nAs is the case for the official FlatBuffers repository, this fork is also\nlicensed under the terms of Apache License, Version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvy%2Fflatc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvy%2Fflatc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvy%2Fflatc/lists"}