{"id":20594826,"url":"https://github.com/ansman/auto-dagger","last_synced_at":"2025-04-09T17:23:30.043Z","repository":{"id":65960092,"uuid":"565464998","full_name":"ansman/auto-dagger","owner":"ansman","description":"Automatic Dagger setup using Hilt","archived":false,"fork":false,"pushed_at":"2025-03-31T14:13:57.000Z","size":22839,"stargazers_count":70,"open_issues_count":5,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T15:38:49.085Z","etag":null,"topics":["android","dagger","hilt","kotlin"],"latest_commit_sha":null,"homepage":"https://auto-dagger.ansman.se","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/ansman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-13T13:56:37.000Z","updated_at":"2025-03-31T14:14:00.000Z","dependencies_parsed_at":"2023-05-29T04:00:13.404Z","dependency_job_id":"7e2a1521-dea5-4deb-b3f4-f89ebef63259","html_url":"https://github.com/ansman/auto-dagger","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansman%2Fauto-dagger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansman%2Fauto-dagger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansman%2Fauto-dagger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansman%2Fauto-dagger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansman","download_url":"https://codeload.github.com/ansman/auto-dagger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248075395,"owners_count":21043577,"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":["android","dagger","hilt","kotlin"],"created_at":"2024-11-16T08:10:19.787Z","updated_at":"2025-04-09T17:23:30.017Z","avatar_url":"https://github.com/ansman.png","language":"Kotlin","readme":"Auto Dagger [![Build Gradle](https://github.com/ansman/auto-dagger/actions/workflows/gradle.yml/badge.svg?branch=main)](https://github.com/ansman/auto-dagger/actions/workflows/gradle.yml) [![Maven Central](https://img.shields.io/maven-central/v/se.ansman.dagger.auto/core.svg)](https://central.sonatype.com/search?namespace=se.ansman.dagger.auto)\n===\nAuto Dagger allows you to automate some Dagger setup using Hilt.\n\nFor example you can use the `@AutoInitialize` annotation to automatically initialize objects\nduring app launch and you can use the `@AutoBind` annotation to automatically bind objects.\n\nAutomatic initialization is done using AndroidX Startup.\n\nTo read more please refer to the [documentation](https://auto-dagger.ansman.se/).\n\nFor the changelog see the [releases page](https://github.com/ansman/auto-dagger/releases).\n\nBasic usage\n---\n```kotlin\ninterface Repository\n\n@AutoInitialize // Automatically create the repo during startup\n@AutoBind // Automatically bind RealRepository as Repository\n@Singleton\nclass RealRepository @Inject constructor() : Repository {\n    init {\n        // This will be executed at application startup, even if nobody injects it.\n    }\n}\n\n@AutoInitialize\n@Singleton\nclass InitializableRepository @Inject constructor() : Initializable {\n    override fun initialize() {\n        // This will be executed at application startup, even if nobody injects it.\n    }\n}\n\n```\n\nFor the full documentation see https://auto-dagger.ansman.se/\n\nSetup\n---\nFor detailed instructions see the [getting-started](https://auto-dagger.ansman.se/latest/getting-started/) page.\n```groovy\ndependencies {\n    // Set up your dagger dependencies and compiler\n\n    // Include this in kotlin or android modules\n    implementation(\"se.ansman.dagger.auto:core:1.5.0\")\n    kapt(\"se.ansman.dagger.auto:compiler:1.5.0\")\n    // If you're using KSP\n    ksp(\"se.ansman.dagger.auto:compiler:1.5.0\")\n\n\n    // Include this in your app module\n    implementation(\"se.ansman.dagger.auto:android:1.5.0\")\n    // Or this in your library module\n    implementation(\"se.ansman.dagger.auto:android-api:1.5.0\")\n\n    // Add these if you want to replace objects during tests\n    testImplementation(\"se.ansman.dagger.auto:android-testing:1.5.0\")\n    kaptTest(\"se.ansman.dagger.auto:compiler:1.5.0\")\n    // If you're using KSP\n    kspTest(\"se.ansman.dagger.auto:compiler:1.5.0\")\n\n    // If you want to provide Retrofit services add the Retrofit dependency\n    implementation(\"se.ansman.dagger.auto:retrofit:1.5.0\")\n\n    // If you want to provide Ktorfit services add the Retrofit dependency\n    implementation(\"se.ansman.dagger.auto:ktorfit:1.5.0\")\n\n    // If you want to inject a CoroutineScope into ViewModels add the ViewModel dependency\n    implementation(\"se.ansman.dagger.auto:androidx-viewmodel:1.5.0\")\n\n    // If you want to automatically provide your Room DAOs add the Room dependency\n    implementation(\"se.ansman.dagger.auto:androidx-room:1.5.0\")\n}\n```\n\nLicense\n---\nThis project is licensed under the Apache-2.0 license. See [LICENSE.txt](LICENSE.txt) for the full license.\n```plain\n\nCopyright 2022-2024 Nicklas Ansman Giertz\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansman%2Fauto-dagger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansman%2Fauto-dagger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansman%2Fauto-dagger/lists"}