All Projects → RBusarow → Tangle

RBusarow / Tangle

Licence: Apache-2.0 license
Android injection using the Anvil compiler plugin

Programming Languages

kotlin
9241 projects
shell
77523 projects

Projects that are alternatives of or similar to Tangle

Daggraph
Dagger dependency graph generator for Android Developers
Stars: ✭ 1,140 (+1653.85%)
Mutual labels:  dependency-injection, dagger2
Dagger2 Mvp Sample
Android Sample to explain Dagger 2 and MVP in android applications.
Stars: ✭ 106 (+63.08%)
Mutual labels:  dependency-injection, dagger2
Android App Architecture Mvvm Databinding
A simple but complete project (in both Java & Kotlin) to demonstrate the Android application architecture with MVVM pattern, a client app for The Movie DB Web API. Dagger2 is used for dependency injection and RxJava is used for RFP (Reactive Functional Programming).
Stars: ✭ 69 (+6.15%)
Mutual labels:  dependency-injection, dagger2
Dagger Android Injection
Sample project explains Dependency Injection in Android using dagger-android framework.
Stars: ✭ 524 (+706.15%)
Mutual labels:  dependency-injection, dagger2
Movies Kotlin Kata
Katas for practice Kotlin( Coroutines, dataclasses, delegate properties...) Clean Architecture and best practices in Android(DI, Dagger, MVP, Espresso) implemented by Jorge Sánchez (Xurxodev)
Stars: ✭ 240 (+269.23%)
Mutual labels:  dependency-injection, dagger2
Scabbard
🗡 A tool to visualize Dagger 2 dependency graphs
Stars: ✭ 615 (+846.15%)
Mutual labels:  dependency-injection, dagger2
Mvpandroid
Sample app to demonstrate MVP (Model - View - Presenter) architecture in android
Stars: ✭ 91 (+40%)
Mutual labels:  dependency-injection, dagger2
catchflicks
🎬 Kitchen sink project for learning android concepts 🎬
Stars: ✭ 12 (-81.54%)
Mutual labels:  dependency-injection, dagger2
Android Clean Architecture
Showcasing a Clean Architecture approach from our Android applications framework!
Stars: ✭ 160 (+146.15%)
Mutual labels:  dependency-injection, dagger2
Dagger2
Kotlin Dagger2 example project
Stars: ✭ 145 (+123.08%)
Mutual labels:  dependency-injection, dagger2
Instant Weather
An Android weather application implemented using the MVVM pattern, Retrofit2, Dagger2, LiveData, ViewModel, Coroutines, Room, Navigation Components, Data Binding and some other libraries from the Android Jetpack.
Stars: ✭ 473 (+627.69%)
Mutual labels:  dependency-injection, dagger2
MultipleAppModules
An example how to use multiple application modules in one android project
Stars: ✭ 105 (+61.54%)
Mutual labels:  dependency-injection, dagger2
Android Dagger2 Example
This project implements the dagger 2 in android for dependency injection
Stars: ✭ 453 (+596.92%)
Mutual labels:  dependency-injection, dagger2
Android Mvvm Rxjava2 Dagger2
This repository contains a detailed sample application that uses MVVM as its presentation layer pattern. Essential dependencies are Dagger2 with Dagger-android, RxJava2 with RxAndroid, Room, Retrofit and Espresso.
Stars: ✭ 50 (-23.08%)
Mutual labels:  dependency-injection, dagger2
dagger-track
Gradle plugin to add clock trackings to your dagger components and subcomponents
Stars: ✭ 59 (-9.23%)
Mutual labels:  dependency-injection, dagger2
Price Tracker
Price Tracking Application - An experimental Kotlin Android project with complex android app requirements.
Stars: ✭ 80 (+23.08%)
Mutual labels:  dependency-injection, dagger2
BESTV
Android TV App powered by TMDb. It is a easy way to find the best TV content, the top movies, series... all of that in your TV.
Stars: ✭ 49 (-24.62%)
Mutual labels:  dependency-injection, dagger2
movie-booking
An example for booking movie seat, combined of Android Data Binding, State Design Pattern and Multibinding + Autofactory. iOS version is: https://github.com/lizhiquan/MovieBooking
Stars: ✭ 80 (+23.08%)
Mutual labels:  dependency-injection, dagger2
Kotlin Mvvm Architecture
Android Architecture Design Patterns using Kotlin, MVVM, Dagger2, LiveData, Room, MediatorLiveData, NetworkBoundResources, Retrofit, AndroidX, ViewModels, Dependency Injection using Dagger2, Repository pattern.
Stars: ✭ 126 (+93.85%)
Mutual labels:  dependency-injection, dagger2
ThinkRchive
An app showing all details for various Lenovo Thinkpad models. Made to try out Jepack Compose for Android.
Stars: ✭ 84 (+29.23%)
Mutual labels:  dependency-injection, dagger2

Maven Central Gradle Plugin Portal License


Tangle creates Dagger bindings for Android classes using the Anvil Kotlin compiler plugin. This is meant to be an alternative to Hilt, for those who'd prefer to enjoy the faster compilation and better flexibility of Anvil.

Since Tangle is an extension upon Anvil, its code generation will be applied to Kotlin files only.

Please see the project website for full documentation.

Features

ViewModel Injection

class MyViewModel @VMInject constructor(
  val repository: MyRepository,
  @TangleParam("userId") // pulls the "userId" argument out of SavedStateHandle
  val userId: String
) : ViewModel()

@Composable
fun MyComposable(
  navController: NavController,
  viewModel: MyViewModel = tangleViewModel()
) { /* ... */ }

class MyFragment : Fragment() {
  val viewModel: MyViewModel by tangleViewModel()
}

Inject ViewModels, including scoped SavedStateHandle arguments. Use the @TangleParam annotation to automatically extract navigation/Bundle arguments and inject them directly. read more

Fragment Injection with Bundle arguments

@ContributesFragment(AppScope::class)
class MyFragment @FragmentInject constructor(
  val repository: MyRepository
) : Fragment() {

  val name: String by arg("name")

  @FragmentInjectFactory
  interface Factory {
    fun create(
      @TangleParam("name") name: String
    ): MyFragment
  }
}

Use constructor injection in Fragments, with optional AssistedInject-like factories for type-safe Bundle arguments. Bindings are created automatically. read more

Worker Injection

@TangleWorker
class MyWorker @AssistedInject constructor(
  @Assisted context: Context,
  @Assisted params: WorkerParameters
) : CoroutineWorker(context,params) {
  override suspend fun doWork(): Result {
    /* ... */
  }
}

Use Dagger's @AssistedInject and @Assisted annotations and @TangleWorker to inject any ListenableWorker. read more

License

Copyright (C) 2021 Rick Busarow
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.
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].