Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
IVIanuu committed Feb 21, 2024
1 parent a320a39 commit 6a1c996
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,31 @@ suspend fun main() {
}
```

# Setup
```kotlin
// in your buildscript
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("com.ivianuu.injekt:injekt-gradle-plugin:${latest_version}")
}
}

// in your app module
plugins {
apply("com.ivianuu.injekt")
}

dependencies {
// core runtime
implementation("com.ivianuu.injekt:core:${latest_version}")
// optional - common utilities
implementation("com.ivianuu.injekt:common:${latest_version}")
}
```

# Provide injectables
You can provide dependencies by annotating them with @Provide:
```kotlin
Expand Down Expand Up @@ -166,30 +191,5 @@ typealias TrackId = @TrackIdTag String
fun loadPlaylistTracks(playlistId: PlaylistId = inject, trackId: TrackId = inject): List<Track> = ...
```

# Setup
```kotlin
// in your buildscript
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("com.ivianuu.injekt:injekt-gradle-plugin:${latest_version}")
}
}

// in your app module
plugins {
apply("com.ivianuu.injekt")
}

dependencies {
// core runtime
implementation("com.ivianuu.injekt:core:${latest_version}")
// optional - common utilities
implementation("com.ivianuu.injekt:common:${latest_version}")
}
```

# More complex uses can be found in my essentials project(base project for my apps)
# https://github.com/IVIanuu/essentials

0 comments on commit 6a1c996

Please sign in to comment.