Merge branch 'common' into common-spring
This commit is contained in:
commit
eb7e14aedc
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
## Installation via Gradle Composite Build
|
||||
|
||||
1. Add this repository as
|
||||
1. Add this repository as a
|
||||
[git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
||||
of your project
|
||||
to your project
|
||||
|
||||
1. Add to your `settings.gradle.kts` these lines:
|
||||
1. Add these lines to your `settings.gradle.kts` these lines:
|
||||
|
||||
```kotlin
|
||||
includeBuild("Backend-common")
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ subprojects {
|
|||
|
||||
println("Enabling Spring Boot Dependency Management in project ${project.name}...")
|
||||
apply(plugin = "io.spring.dependency-management")
|
||||
|
||||
configure<DependencyManagementExtension> {
|
||||
imports {
|
||||
mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
|
||||
|
|
@ -49,7 +50,6 @@ subprojects {
|
|||
dependency("ch.qos.logback.contrib:logback-json-classic:0.1.5")
|
||||
dependency("ch.qos.logback.contrib:logback-jackson:0.1.5")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
@ -58,7 +58,6 @@ subprojects {
|
|||
implementation ("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
||||
|
||||
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
|
||||
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class ExecutionContext<T>(val init: () -> T) {
|
|||
}
|
||||
|
||||
fun reset(): T {
|
||||
return init().also(::set)
|
||||
return init().also(this::set)
|
||||
}
|
||||
|
||||
fun get(): T? {
|
||||
|
|
@ -20,7 +20,7 @@ class ExecutionContext<T>(val init: () -> T) {
|
|||
fun updateContext(updater: (T) -> T): T? {
|
||||
return (get() ?: init())
|
||||
.let(updater)
|
||||
.also(::set)
|
||||
.also(this::set)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ pluginManagement {
|
|||
useVersion(it.second)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue