All Projects → chRyNaN → inject

chRyNaN / inject

Licence: Apache-2.0 license
A simple Kotlin multi-platform abstraction around the javax.inject annotations.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to inject

PopKorn
DI can be simple. Forget about modules and components. Just use it!
Stars: ✭ 139 (+230.95%)
Mutual labels:  dependency-injection, injection, kotlin-multiplatform
Koin
Koin - a pragmatic lightweight dependency injection framework for Kotlin
Stars: ✭ 7,142 (+16904.76%)
Mutual labels:  dependency-injection, injection, kotlin-multiplatform
React Ioc
Hierarchical Dependency Injection with new React 16 Context API
Stars: ✭ 133 (+216.67%)
Mutual labels:  dependency-injection, injection
Tsyringe
Lightweight dependency injection container for JavaScript/TypeScript
Stars: ✭ 2,761 (+6473.81%)
Mutual labels:  dependency-injection, injection
AnnotationInject
Compile-time Swift dependency injection annotations
Stars: ✭ 40 (-4.76%)
Mutual labels:  dependency-injection, injection
Dikit
Dependency Injection Framework for Swift, inspired by KOIN.
Stars: ✭ 77 (+83.33%)
Mutual labels:  dependency-injection, injection
Container Ioc
Inversion of Control container & Dependency Injection for Javascript and Node.js apps powered by Typescript.
Stars: ✭ 89 (+111.9%)
Mutual labels:  dependency-injection, injection
vesselize
⛵ A JavaScript IoC container that works seamlessly with Vue.js and React.
Stars: ✭ 22 (-47.62%)
Mutual labels:  dependency-injection, injection
opyoid
Dependency injection library for Python
Stars: ✭ 34 (-19.05%)
Mutual labels:  dependency-injection, injection
DaggerAutoInject
Inject automatically your Activities & Fragments, just with a simple annotation
Stars: ✭ 49 (+16.67%)
Mutual labels:  injection, inject
kotlin-multiplatform-example
A Kotlin multiplatform example app that targets Android, ReactJS, iOS, JavaFx, and Spring Boot
Stars: ✭ 115 (+173.81%)
Mutual labels:  kotlin-multiplatform, kotlin-multi-platform
Poodinis
A dependency injection framework for D with support for autowiring.
Stars: ✭ 57 (+35.71%)
Mutual labels:  dependency-injection, injection
DependencyInjector
Lightweight dependency injector
Stars: ✭ 30 (-28.57%)
Mutual labels:  dependency-injection, injection
Swiftdi
SwiftDI the new way to use your dependency in Swift 5.1
Stars: ✭ 107 (+154.76%)
Mutual labels:  dependency-injection, injection
Kangaru
🦘 A dependency injection container for C++11, C++14 and later
Stars: ✭ 297 (+607.14%)
Mutual labels:  dependency-injection, injection
chords
A Kotlin multi-platform view library for displaying stringed instrument chord diagrams
Stars: ✭ 25 (-40.48%)
Mutual labels:  kotlin-multiplatform, kotlin-multi-platform
refuel
Lightweight dependency injection engine and DI-driven tools.
Stars: ✭ 21 (-50%)
Mutual labels:  dependency-injection, injection
fusion
A simple automated dependency injection library for TypeScript, supporting React class and functional components.
Stars: ✭ 18 (-57.14%)
Mutual labels:  dependency-injection, injection
Reflex
Minimal dependency injection framework for Unity
Stars: ✭ 263 (+526.19%)
Mutual labels:  dependency-injection, injection
tsdi
Dependency Injection container (IoC) for TypeScript
Stars: ✭ 50 (+19.05%)
Mutual labels:  dependency-injection, injection

Inject

A simple Kotlin multi-platform abstraction around the javax.inject annotations. This allows using the annotations in Kotlin common code so that platform specific annotation processors can register them.
GitHub tag (latest by date)

For more information about the library, refer to the blog post here which was featured in Android Weekly issue #396. Badge

The blog post was also featured in Kotlin Weekly issue #182.

Using the library

Simply use the provided annotations just as you would use the javax.inject annotations.

For example, using the Inject annotation on a constructor in Kotlin Common code:

class MyUseCase @Inject constructor() { ... }

Available annotations and interfaces

  • @Inject
  • @Named("name")
  • @Qualifier
  • @Scope
  • @Singleton
  • Provider<T>

Building the library

The library is provided through repsy.io. Checkout the releases package to get the latest version.
GitHub tag (latest by date)

Repository

repositories {
    maven { url = "https://repo.repsy.io/mvn/chrynan/public" }
}

Dependencies

implementation("com.chrynan.inject:inject:VERSION")

Documentation

More detailed documentation is available in the docs folder. The entry point to the documentation can be found here.

License

Copyright 2021 chRyNaN

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

The javax.inject library is also licensed under the Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].