{"id":23890415,"url":"https://github.com/beyama/winter","last_synced_at":"2026-03-05T04:31:45.105Z","repository":{"id":57735643,"uuid":"107642059","full_name":"beyama/winter","owner":"beyama","description":"Kotlin Dependency Injection","archived":false,"fork":false,"pushed_at":"2024-07-31T08:53:13.000Z","size":2002,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-03-24T08:12:14.321Z","etag":null,"topics":["android","annotation-processor","dependency-injection","kotlin","kotlin-dependency-injection"],"latest_commit_sha":null,"homepage":"https://winter.jentz.io","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/beyama.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-10-20T06:46:30.000Z","updated_at":"2025-01-10T07:08:09.000Z","dependencies_parsed_at":"2024-04-15T22:35:47.924Z","dependency_job_id":"745e49e8-d5c7-43bd-872c-047188987e8a","html_url":"https://github.com/beyama/winter","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyama%2Fwinter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyama%2Fwinter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyama%2Fwinter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beyama%2Fwinter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beyama","download_url":"https://codeload.github.com/beyama/winter/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190500,"owners_count":21062284,"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","annotation-processor","dependency-injection","kotlin","kotlin-dependency-injection"],"created_at":"2025-01-04T11:07:36.276Z","updated_at":"2026-03-05T04:31:45.076Z","avatar_url":"https://github.com/beyama.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Winter\n\n[![Kotlin 1.3.40](https://img.shields.io/badge/Kotlin-1.3-blue.svg)](http://kotlinlang.org)\n[![Maven Central](https://img.shields.io/maven-central/v/io.jentz.winter/winter.svg)](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.jentz.winter%22)\n[![Travis](https://travis-ci.org/beyama/winter.svg?branch=develop)](https://travis-ci.org/beyama/winter/builds)\n[![MIT License](https://img.shields.io/github/license/beyama/winter.svg)](https://github.com/beyama/winter/blob/master/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/beyama/winter.svg)](https://github.com/beyama/winter/issues)\n\n## Kotlin Dependency Injection\n\nWinter is a fast and intuitive dependency injection library for Kotlin on Android and the JVM.\n\nIt offers an idiomatic Kotlin API as well as optional JSR-330 support\nwith annotation processor.\n\n**[Winter documentation](https://winter.jentz.io/)**\n\n## Installation\n\n```groovy\ndependencies {\n  // Core\n  implementation 'io.jentz.winter:winter:0.7.0'\n  // AndroidX support\n  implementation 'io.jentz.winter:winter-androidx:0.7.0'\n  // RxJava 2 disposable plugin\n  implementation 'io.jentz.winter:winter-rxjava2:0.7.0'\n  // Java support\n  implementation 'io.jentz.winter:winter-java:0.7.0'\n  // JUnit 4 test support\n  testImplementation 'io.jentz.winter:winter-junit4:0.7.0'  \n  // JUnit 5 test support\n  testImplementation 'io.jentz.winter:winter-junit5:0.7.0'  \n  // Optional JSR-330 support\n  kapt 'io.jentz.winter:winter-compiler:0.7.0'\n}\n```\n\n## Quickstart Android\n\nGiven is an Android application with an application component, a presentation subcomponent that \nsurvives orientation changes and an activity subcomponent.\n\n```kotlin\n\nclass MyApplication : Application() {\n  override fun onCreate() {\n    // define application component\n    Winter.component(ApplicationScope::class) {\n      singleton\u003cHttpClient\u003e { HttpClientImpl() }\n      singleton\u003cGitHubApi\u003e { GitHubApiImpl(instance()) }\n      \n        // define presentation subcomponent\n        subcomponent(PresentationScope::class) {\n          singleton\u003cReposListViewModel\u003e { RepolistViewModel(instance\u003cGitHubApi\u003e()) }\n          \n          // define activity subcomponent\n          subcomponent(ActivityScope::class) {\n            singleton { Glide.with(instance()) }\n          }\n        }\n    }\n\n    // Configure the injection adapter to use   \n    Winter.useAndroidPresentationScopeAdapter()\n    // Create application dependency graph\n    Winter.inject(this)\n  }\n}\n\nclass MyActivity : Activity() {\n  private val viewModel: RepoListViewModel by inject()\n  private val glide: RequestManager by inject()\n\n  override fun onCreate(savedInstanceState: Bundle?) {\n    Winter.inject(this)\n    super.onCreate(savedInstanceState)\n  }\n\n}\n\n```\n\n## Read more\n\nWinter is used in production since end of 2017. The API is considered mostly stable but there will\nbe no guarantee before version 1.x.\n\nWinter supports only Android and JVM right now but support for native (iOS) and JavaScript is planed.  \n\n**[Winter documentation](https://winter.jentz.io/)**\n\n## License\n\n    Copyright 2017 Alexander Jentz\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyama%2Fwinter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeyama%2Fwinter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeyama%2Fwinter/lists"}