All Projects → blipinsk → dagger2-ktx

blipinsk / dagger2-ktx

Licence: other
Kotlin extension bridge library for Dagger2 (proof-of-concept)

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to dagger2-ktx

AnnotationProcessorStarter
Project to set up basics of a Java annotation processor
Stars: ✭ 19 (-53.66%)
Mutual labels:  annotations, annotation-processor, annotation-processing
AnnotationProcessing
✔️ㅤ[ARTICLE] Writing your own Annotation Processors in Android
Stars: ✭ 47 (+14.63%)
Mutual labels:  annotations, annotation-processor, annotation-processing
Placeholderview
This library provides advance views for lists and stacks. Some of the views are build on top of RecyclerView and others are written in their own. Annotations are compiled by annotation processor to generate bind classes. DOCS -->
Stars: ✭ 2,104 (+5031.71%)
Mutual labels:  annotations, annotation-processor, annotation-processing
RapidORM
Quick solutions for Android ORM
Stars: ✭ 24 (-41.46%)
Mutual labels:  annotation-processor, annotation-processing
Android Demos
Android develop demos
Stars: ✭ 126 (+207.32%)
Mutual labels:  annotations, dagger2
Kotlin-Annotation-Processor
Annotation Processor Sample in Kotlin
Stars: ✭ 19 (-53.66%)
Mutual labels:  annotation-processor, annotation-processing
Gsonpath
A Java annotation processor library which generates gson type adapters using basic JsonPath style annotations
Stars: ✭ 54 (+31.71%)
Mutual labels:  annotations, annotation-processor
aptk
A toolkit project to enable you to build annotation processors more easily
Stars: ✭ 28 (-31.71%)
Mutual labels:  annotations, annotation-processor
symbok-bundle
Symfony annotations bundle
Stars: ✭ 50 (+21.95%)
Mutual labels:  annotations, annotation-processing
simple-preferences
Android Library to simplify SharedPreferences use with code generation.
Stars: ✭ 48 (+17.07%)
Mutual labels:  annotations, annotation-processor
piri
Piri is a lightweight annotation processing library that generates static factory methods for your Activities and Fragments.
Stars: ✭ 53 (+29.27%)
Mutual labels:  annotation-processor, annotation-processing
AutoBindings
Set of annotations that aims to make your Android development experience easier along with lint checks.
Stars: ✭ 15 (-63.41%)
Mutual labels:  annotations, annotation-processor
Kripton
A Java/Kotlin library for Android platform, to manage bean's persistence in SQLite, SharedPreferences, JSON, XML, Properties, Yaml, CBOR.
Stars: ✭ 110 (+168.29%)
Mutual labels:  annotations, annotation-processor
Kotlin Builder Annotation
A minimal viable replacement for the Lombok @Builder plugin for Kotlin code
Stars: ✭ 67 (+63.41%)
Mutual labels:  annotations, annotation-processor
Kpoet
An expressive DSL built on top of JavaPoet to make writing code almost as easy as writing the code yourself.
Stars: ✭ 58 (+41.46%)
Mutual labels:  annotations, annotation-processor
MethodScope
Reduce repetitive inheritance works in OOP world using @MethodScope.
Stars: ✭ 33 (-19.51%)
Mutual labels:  annotation-processor, annotation-processing
Preferenceroom
🚚 Android processing library for managing SharedPreferences persistence efficiently and structurally.
Stars: ✭ 341 (+731.71%)
Mutual labels:  annotations, annotation-processor
Zerocell
Simple, efficient Excel to POJO library for Java
Stars: ✭ 53 (+29.27%)
Mutual labels:  annotations, annotation-processor
CrowdTruth-core
CrowdTruth framework for crowdsourcing ground truth for training & evaluation of AI systems
Stars: ✭ 45 (+9.76%)
Mutual labels:  annotations, annotation-processing
ColdStorage
Lightweight data loading and caching library for android
Stars: ✭ 39 (-4.88%)
Mutual labels:  annotations, annotation-processor

dagger2-ktx

Kotlin extension bridge library for Dagger2 (proof-of-concept)

Read more here: Kotlin extension function generation 🚀

Usage

For a working implementation of this library see the sample/ module.

  1. Add to your module's build.gradle

    • for Android project:

      android {
          sourceSets {
              main.java.srcDirs += 'src/main/kotlin'
              debug.java.srcDirs += 'src/debug/kotlin'
              release.java.srcDirs += 'src/release/kotlin'
              test.java.srcDirs += 'src/test/kotlin'
      
              // For kapt stubs
              main.java.srcDirs += [file("$buildDir/generated/source/kapt/main")]
              debug.java.srcDirs += [file("$buildDir/generated/source/kapt/debug")]
              release.java.srcDirs += [file("$buildDir/generated/source/kapt/release")]
              test.java.srcDirs += [file("$buildDir/generated/source/kapt/test")]
      
              // For kotlin code gen during kapt
              main.java.srcDirs += [file("$buildDir/generated/source/kaptKotlin/main")]
              debug.java.srcDirs += [file("$buildDir/generated/source/kaptKotlin/debug")]
              release.java.srcDirs += [file("$buildDir/generated/source/kaptKotlin/release")]
              test.java.srcDirs += [file("$buildDir/generated/source/kaptKotlin/test")]
          }
      }
    • for Java/Kotlin project:

      apply plugin: 'idea'
      
      idea {
        module {
          sourceDirs += files(
              'build/generated/source/kapt/main',
              'build/generated/source/kaptKotlin/main',
              'build/tmp/kapt/main/kotlinGenerated')
          generatedSourceDirs += files(
              'build/generated/source/kapt/main',
              'build/generated/source/kaptKotlin/main',
              'build/tmp/kapt/main/kotlinGenerated')
        }
      }
  2. Instead of creating your component with

    DaggerYourComponent.create()

    use:

    Dagger.create(YourComponent::class)
  3. Enjoy no issues with imports of the DaggerYourComponent

Including In Your Project

Add in your build.gradle:

repositories {
    maven { url 'https://dl.bintray.com/blipinsk/maven/' }
}

dependencies {
    kapt "com.bartoszlipinski:dagger2-ktx-compiler:0.1.0"
    implementation "com.bartoszlipinski:dagger2-ktx:0.1.0"
}

Developed by

  • Bartosz Lipiński

License

Copyright 2018 Bartosz Lipiński

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].