Lightweight Kotlin DSL dependency injection library

Related tags

Kotlin Warehouse
Overview

Warehouse DSL

Codacy Badge Codacy Badge License FOSSA Status

Warehouse is a lightweight Kotlin DSL dependency injection library this library has an extremely faster learning curve and more human friendly logs and more explicit it has graph nesting and multi-module support.

Create

 val warehouse = warehouse {
    this add module {
        this add factory {
            this constructor { "Jon" }
            this creation CreationPattern.SINGLETON
            this injectsIn Name::class
        }

        this add factory {
            this constructor { Name(param()) }
        }
    }
}

Use

private val name: Name by warehouse.inject()

Install

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven {
            		url = uri("https://maven.pkg.github.com/osama-raddad/Warehouse")
            		credentials { //this is temporary solution until github fixes the public packages problem (this key is ready only)
                		username = "osama-raddad"
                		password = "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" 
           		}
       		}
	}
}

Step 2. Add the dependency

	dependencies {
	        implementation 'org.raddad:warehouse:1.1.0'
	}

Contributing

We welcome contributions to Warehouse!

  • ⇄ Pull requests and ★ Stars are always welcome.

Let me know!

I’d be really happy if you sent me links to your projects where you use my library. Just send an email to [email protected] And do let me know if you have any questions or suggestion regarding the library.

License

Copyright 2021, Osama Raddad

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.
You might also like...
A light weight Compose Animation library to choreograph low level Animation API through Kotlin DSL.

Koreography Choreograph your Compose Animation 💃 🕺 A lightweight Compose Animation utility library to choreograph low-level Animation API (https://d

Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = ❤️

kotlin-android-template 🤖 A simple Github template that lets you create an Android/Kotlin project and be up and running in a few seconds. This templa

Automatic CoroutineDispatcher injection and extensions for kotlinx.coroutines

Dispatch Utilities for kotlinx.coroutines which make them type-safe, easier to test, and more expressive. Use the predefined types and factories or de

A injection minecraft cheat using jvm attach api

Luminous A injection minecraft cheat using jvm attach api Website: https://lumi.getfdp.today Build We used a thing called Wrapper to make development

A composite Github Action to execute the Kotlin Script with compiler plugin and dependency caching!

Kotlin Script Github Action Kotlin can also be used as a scripting language, which is more safer, concise, and fun to write than bash or python. Githu

{ } Declarative Kotlin DSL for choreographing Android transitions
{ } Declarative Kotlin DSL for choreographing Android transitions

Transition X Kotlin DSL for choreographing Android Transitions TransitionManager makes it easy to animate simple changes to layout without needing to

Kotlin Dsl for Android RecyclerView

KRecyclerDsl Kotlin Dsl for Android RecyclerView Exemple Sample project recyclerView.adapter = dataClassAdapterMyView, MyDataClass(R.layout.my_view,

Nice and simple DSL for Espresso in Kotlin
Nice and simple DSL for Espresso in Kotlin

Kakao Nice and simple DSL for Espresso in Kotlin Introduction At Agoda, we have more than 1000 automated tests to ensure our application's quality and

DSL for constructing the drawables in Kotlin instead of in XML

Android Drawable Kotlin DSL DSL for constructing the drawables in Kotlin instead of in XML Examples Shape drawables ?xml version="1.0" encoding="utf-

Comments
  • performance improvements

    performance improvements

    Pull Request Template

    Description

    Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

    Fixes # (issue)

    Type of change

    Please delete options that are not relevant.

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] This change requires a documentation update

    How Has This Been Tested?

    Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

    • [ ] Test A
    • [ ] Test B

    Test Configuration:

    • Firmware version:
    • Hardware:
    • Toolchain:
    • SDK:

    Checklist:

    • [ ] My code follows the style guidelines of this project
    • [ ] I have performed a self-review of my own code
    • [ ] I have commented my code, particularly in hard-to-understand areas
    • [ ] I have made corresponding changes to the documentation
    • [ ] My changes generate no new warnings
    • [ ] I have added tests that prove my fix is effective or that my feature works
    • [ ] New and existing unit tests pass locally with my changes
    • [ ] Any dependent changes have been merged and published in downstream modules
    • [ ] I have checked my code and corrected any misspellings
    opened by osama-raddad 0
Releases(1.6.8x)
Owner
Osama Raddad
Software Engineer at Volvo Trucks
Osama Raddad
Dependency Injection library for Compose Multiplatform, Koin wrapper.

?? Cokoin Injection library for Compose (Multiplatform and Jetpack), Koin wrapper. It uses @Composable functions to configure KoinContext and Scopes.

Bruno Wieczorek 57 Dec 29, 2022
🍭 GithubSearchKMM - Github Repos Search - Android - iOS - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Dependency Injection, shared KMP ViewModel, Clean Architecture

GithubSearchKMM Github Repos Search - Kotlin Multiplatform Mobile using Jetpack Compose, SwiftUI, FlowRedux, Coroutines Flow, Dagger Hilt, Koin Depend

Petrus Nguyễn Thái Học 50 Jan 7, 2023
Kotlin-client-dsl - A kotlin-based dsl project for a (Client) -> (Plugin) styled program

kotlin-client-dsl a kotlin-based dsl project for a (Client) -> (Plugin) styled p

jackson 3 Dec 10, 2022
Built with Jetpack compose, multi modules MVVM clean architecture, coroutines + flow, dependency injection, jetpack navigation and other jetpack components

RickAndMortyCompose - Work in progress A simple app using Jetpack compose, clean architecture, multi modules, coroutines + flows, dependency injection

Daniel Waiguru 9 Jul 13, 2022
Boilerplate code for implementing MVVM in Android using Jetpack libraries, coroutines, dependency injection and local persistance

MVVM Foundation This projects aims to speed up development of Android apps by providing a solid base to extend Libraries Jetpack Fragment Material3 :

Gabriel Gonzalez 2 Nov 10, 2022
Kotlin Object Notation - Lightweight DSL to build fluid JSON trees

Kotlin Object Notation Lightweight kotlin MPP DSL for building JSON trees Setup Just drop the dependency in your commonMain sourceSet kotlin { sourc

Martynas Petuška 43 Dec 10, 2022
View "injection" library for Android.

Kotter Knife Deprecated: This was a terrible idea because it allocates an object for every view reference. Do not use, and do not use anything like it

Jake Wharton 2.2k Dec 28, 2022
A Kotlin DSL wrapper around the mikepenz/MaterialDrawer library.

MaterialDrawerKt Create navigation drawers in your Activities and Fragments without having to write any XML, in pure Kotlin code, with access to all t

Márton Braun 517 Nov 19, 2022
The most complete and powerful data-binding library and persistence infra for Kotlin 1.3, Android & Splitties Views DSL, JavaFX & TornadoFX, JSON, JDBC & SQLite, SharedPreferences.

Lychee (ex. reactive-properties) Lychee is a library to rule all the data. ToC Approach to declaring data Properties Other data-binding libraries Prop

Mike 112 Dec 9, 2022
Kotlin parser library with an easy-to-use DSL

Pratt Library for parsing expressions and a beautiful Kotlin DSL Just define your operators and operands with the Kotlin DSL and the parser is ready!

furetur 9 Oct 17, 2022