Skip to content

Commit

Permalink
Split out :di-kodein-advanced from :di-kodein
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob committed Feb 15, 2020
1 parent 6eb8693 commit 0e2a507
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 3 deletions.
13 changes: 13 additions & 0 deletions other/di-kodein-advanced/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Kodein-DI

Sample project for [Ktor](https://ktor.io) showing how to use [Kodein DI](https://kodein.org/Kodein-DI/) within Ktor.

## Running

Execute this command in the repository's root directory to run this sample:

```bash
./gradlew :di-kodein-advanced:run
```

And navigate to [http://localhost:8080/](http://localhost:8080/) to see the sample home page.
37 changes: 37 additions & 0 deletions other/di-kodein-advanced/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

apply plugin: 'kotlin'
apply plugin: 'application'

mainClassName = "io.ktor.samples.kodein.KodeinAdvancedApplicationKt"

sourceSets {
main.kotlin.srcDirs = [ 'src' ]
test.kotlin.srcDirs = [ 'test' ]
main.resources.srcDirs = [ 'resources' ]
}

repositories {
jcenter()
maven { url "https://dl.bintray.com/kotlin/ktor" }
}

dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "io.ktor:ktor-server-netty:$ktor_version"
compile "ch.qos.logback:logback-classic:$logback_version"

compile "io.ktor:ktor-html-builder:$ktor_version"
compile "io.ktor:ktor-locations:$ktor_version"

compile 'org.kodein.di:kodein-di-generic-jvm:5.2.0'

testCompile "io.ktor:ktor-server-test-host:$ktor_version"
}
3 changes: 0 additions & 3 deletions other/di-kodein/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ dependencies {
compile "io.ktor:ktor-server-netty:$ktor_version"
compile "ch.qos.logback:logback-classic:$logback_version"

compile "io.ktor:ktor-html-builder:$ktor_version"
compile "io.ktor:ktor-locations:$ktor_version"

compile 'org.kodein.di:kodein-di-generic-jvm:5.2.0'

testCompile "io.ktor:ktor-server-test-host:$ktor_version"
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module('other', 'structured-logging')
module('other', 'client-multipart')
module('other', 'client-tools')
module('other', 'di-kodein')
module('other', 'di-kodein-advanced')
module('other', 'reverse-proxy')
module('other', 'reverse-proxy-ws')
module('other', 'redirect-with-exception')
Expand Down

0 comments on commit 0e2a507

Please sign in to comment.