diff --git a/README.md b/README.md index e567104..e00d958 100644 --- a/README.md +++ b/README.md @@ -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") diff --git a/build.gradle.kts b/build.gradle.kts index 8bc21b0..b1473e0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -39,6 +39,7 @@ subprojects { println("Enabling Spring Boot Dependency Management in project ${project.name}...") apply(plugin = "io.spring.dependency-management") + configure { 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 { diff --git a/common/src/main/kotlin/ru/touchin/common/context/ExecutionContext.kt b/common/src/main/kotlin/ru/touchin/common/context/ExecutionContext.kt index 2354bc2..bce8812 100644 --- a/common/src/main/kotlin/ru/touchin/common/context/ExecutionContext.kt +++ b/common/src/main/kotlin/ru/touchin/common/context/ExecutionContext.kt @@ -10,7 +10,7 @@ class ExecutionContext(val init: () -> T) { } fun reset(): T { - return init().also(::set) + return init().also(this::set) } fun get(): T? { @@ -20,7 +20,7 @@ class ExecutionContext(val init: () -> T) { fun updateContext(updater: (T) -> T): T? { return (get() ?: init()) .let(updater) - .also(::set) + .also(this::set) } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 4ad10bb..f278f3c 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -16,7 +16,6 @@ pluginManagement { useVersion(it.second) } } - } }