{"id":17305196,"url":"https://github.com/minndevelopment/gunfire","last_synced_at":"2026-02-14T05:31:14.276Z","repository":{"id":110324318,"uuid":"88094264","full_name":"MinnDevelopment/Gunfire","owner":"MinnDevelopment","description":"Lightweight Event Bus for Kotlin","archived":false,"fork":false,"pushed_at":"2017-04-14T15:32:33.000Z","size":97,"stargazers_count":17,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T13:28:25.913Z","etag":null,"topics":["event","event-emitter","eventbus","hierarchy","kotlin","lightweight"],"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/MinnDevelopment.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":"2017-04-12T20:39:54.000Z","updated_at":"2024-05-16T15:01:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"96c0c053-4c8a-4fbf-a098-1120831eb244","html_url":"https://github.com/MinnDevelopment/Gunfire","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MinnDevelopment/Gunfire","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinnDevelopment%2FGunfire","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinnDevelopment%2FGunfire/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinnDevelopment%2FGunfire/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinnDevelopment%2FGunfire/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MinnDevelopment","download_url":"https://codeload.github.com/MinnDevelopment/Gunfire/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinnDevelopment%2FGunfire/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275737159,"owners_count":25519253,"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","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["event","event-emitter","eventbus","hierarchy","kotlin","lightweight"],"created_at":"2024-10-15T11:54:59.735Z","updated_at":"2025-09-18T08:39:29.765Z","avatar_url":"https://github.com/MinnDevelopment.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Gunfire\n\nProject Gunfire is a lightweight event bus framework which is built in and for the Kotlin Programming Language.\n\u003cbr\u003eThis can be used to fire `bullets` with `guns`!\n\n## Requirements\n\n- Kotlin/JVM 1.1.1+ (including coroutines)\n- Java Runtime for Java 8\n\n### Dependencies\n\n- Kotlinx-Coroutines for Kotlin 1.1.1+\n- Kotlin std-jre8 1.1.1+\n\nRecommended IDE: Intellij IDEA 2017.1\n\n## Getting Started\n\nTo create an EventBus for your project you have to choose your **Gun**:\n\n- Gun\n    \u003cbr\u003eThe generic `Gun` which executes on the calling thread\n- Sniper\n    \u003cbr\u003eExtension of a simple `Gun` which synchronizes each bullet shot\n- Revolver\n    \u003cbr\u003eExtension of a simple `Gun` which can fire up to **6** bullets at once\n- Uzi\n    \u003cbr\u003eFully automatic `Gun` which uses kotlin coroutines for each bullet shot\n\nEvery Gun implementation inherits from the `Gun` class and iterates over all registered `targets`.\n\n### Setup Target\n\n```kotlin\n\nimport club.minnced.gunfire.core.Gun\nimport club.minnced.gunfire.core.impl.Sniper\nimport club.minnced.gunfire.core.target\n\nval gun: Gun = Sniper()\n\nfun main(args: Array\u003cString\u003e) {\n    gun.target\u003cBackfire\u003e {\n        it.error.printStackTrace()\n    }\n    gun.target\u003cLogBullet\u003e {\n        println(it.message)\n    }\n}\n```\n\n\u003e Note: Here we register a target that will print every **Throwable** that is caught by the Gun!\u003cbr\u003e\n\u003e Using the `Backfire` bullet specification!\n\n### Fire Gun\n\n```kotlin\nimport club.minnced.gunfire.core.Gun\nimport club.minnced.gunfire.core.impl.Sniper\nimport club.minnced.gunfire.core.fire\n\nclass LogBullet(val message: String)\n\nfun logMessage(message: String) {\n    gun.fire {\n        LogBullet(message)\n    }\n}\n```\n\n\u003e Note: Here we fire a LogBullet which holds a message for the targets!\n\n## Setup\n\nJitPack Version: [ ![version](https://jitpack.io/v/MinnDevelopment/Gunfire.svg) ](https://jitpack.io/#MinnDevelopment/Gunfire)\n\n### Gradle\n\n```gradle\nrespositories {\n    jcenter()\n    maven {\n        name 'jitpack.io'\n        url 'https://jitpack.io'\n    }\n    // ...\n}\n\ndependencies {\n    compile 'org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.1'\n    compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.14'\n    compile 'com.github.MinnDevelopment.Gunfire:core:master-SNAPSHOT'\n    compile 'com.github.MinnDevelopment.Gunfire:commons:master-SNAPSHOT'\n    // ...\n}\n```\n\n### Maven\n\n```xml\n\u003crepository\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\u003c/repository\u003e\n\u003c!-- \nAdd other repositories for Kotlin 1.1.1 and Kotlinx-Coroutines\nThis may require jcenter as repository listing!\n--\u003e\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupid\u003ecom.github.MinnDevelopment.Gunfire\u003c/groupid\u003e\n        \u003cartifactId\u003ecore\u003c/artifactId\u003e\n        \u003cversion\u003emaster-SNAPSHOT\u003c/version\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupid\u003ecom.github.MinnDevelopment.Gunfire\u003c/groupid\u003e\n        \u003cartifactId\u003ecommons\u003c/artifactId\u003e\n        \u003cversion\u003emaster-SNAPSHOT\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n## Examples\n\nThere is a [Step-by-Step](https://github.com/MinnDevelopment/Gunfire/tree/master/Examples/Step%20by%20Step/src/main/kotlin) guide\nand an example which uses bullets to print messages to the console  in the [Examples Directories](https://github.com/MinnDevelopment/Gunfire/tree/master/Examples)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminndevelopment%2Fgunfire","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminndevelopment%2Fgunfire","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminndevelopment%2Fgunfire/lists"}