From 786e1637b48329b18d3fc50d27075699f178fd69 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Tue, 18 Jan 2022 17:37:25 +0300 Subject: [PATCH] Fix ktor imports --- .space/CODEOWNERS | 1 + controls-core/build.gradle.kts | 2 +- controls-storage/build.gradle.kts | 3 --- .../asynchronous/AsynchronousStorageClient.kt | 2 +- .../asynchronous/commonApi.kt | 2 +- .../synchronous/SynchronousStorageClient.kt | 2 +- .../synchronous/commonApi.kt | 6 ++++-- gradle.properties | 12 ++++++++++++ settings.gradle.kts | 12 ++++++++---- 9 files changed, 29 insertions(+), 13 deletions(-) create mode 100644 .space/CODEOWNERS create mode 100644 gradle.properties diff --git a/.space/CODEOWNERS b/.space/CODEOWNERS new file mode 100644 index 0000000..9f836ea --- /dev/null +++ b/.space/CODEOWNERS @@ -0,0 +1 @@ +./space/* "Project Admin" diff --git a/controls-core/build.gradle.kts b/controls-core/build.gradle.kts index 53769c9..bef9b0a 100644 --- a/controls-core/build.gradle.kts +++ b/controls-core/build.gradle.kts @@ -17,7 +17,7 @@ kotlin { commonMain{ dependencies { api("space.kscience:dataforge-io:$dataforgeVersion") - api(npm.kotlinx.datetime) + api(npmlibs.kotlinx.datetime) } } } diff --git a/controls-storage/build.gradle.kts b/controls-storage/build.gradle.kts index beec52d..13e3d5a 100644 --- a/controls-storage/build.gradle.kts +++ b/controls-storage/build.gradle.kts @@ -4,14 +4,12 @@ plugins { } val dataforgeVersion: String by rootProject.extra -val kotlinx_io_version = "0.1.1" kotlin { sourceSets { commonMain { dependencies { implementation(projects.controlsCore) - implementation("org.jetbrains.kotlinx:kotlinx-io:$kotlinx_io_version") } } @@ -20,7 +18,6 @@ kotlin { implementation(projects.magix.magixApi) implementation(projects.controlsMagixClient) implementation(projects.magix.magixServer) - implementation("org.jetbrains.kotlinx:kotlinx-io-jvm:$kotlinx_io_version") } } } diff --git a/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/asynchronous/AsynchronousStorageClient.kt b/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/asynchronous/AsynchronousStorageClient.kt index fb0adc1..71b5558 100644 --- a/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/asynchronous/AsynchronousStorageClient.kt +++ b/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/asynchronous/AsynchronousStorageClient.kt @@ -1,6 +1,6 @@ package ru.mipt.npm.controls.storage.asynchronous -import kotlinx.io.core.Closeable +import io.ktor.utils.io.core.Closeable import kotlinx.serialization.KSerializer import kotlinx.serialization.serializer import ru.mipt.npm.controls.api.PropertyChangedMessage diff --git a/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/asynchronous/commonApi.kt b/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/asynchronous/commonApi.kt index d67ae89..26f6ddb 100644 --- a/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/asynchronous/commonApi.kt +++ b/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/asynchronous/commonApi.kt @@ -1,11 +1,11 @@ package ru.mipt.npm.controls.storage.asynchronous +import io.ktor.utils.io.core.use import kotlinx.coroutines.InternalCoroutinesApi import kotlinx.coroutines.Job import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach -import kotlinx.io.core.use import ru.mipt.npm.controls.api.DeviceMessage import ru.mipt.npm.controls.api.PropertyChangedMessage import ru.mipt.npm.controls.controllers.DeviceManager diff --git a/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/synchronous/SynchronousStorageClient.kt b/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/synchronous/SynchronousStorageClient.kt index aac13de..3b6cfdf 100644 --- a/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/synchronous/SynchronousStorageClient.kt +++ b/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/synchronous/SynchronousStorageClient.kt @@ -1,6 +1,6 @@ package ru.mipt.npm.controls.storage.synchronous -import kotlinx.io.core.Closeable +import io.ktor.utils.io.core.Closeable import kotlinx.serialization.KSerializer import kotlinx.serialization.serializer import ru.mipt.npm.controls.api.PropertyChangedMessage diff --git a/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/synchronous/commonApi.kt b/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/synchronous/commonApi.kt index 613b1e9..7a074f6 100644 --- a/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/synchronous/commonApi.kt +++ b/controls-storage/src/commonMain/kotlin/ru.mipt.npm.controls.storage/synchronous/commonApi.kt @@ -1,9 +1,11 @@ package ru.mipt.npm.controls.storage.synchronous +import io.ktor.utils.io.core.use import kotlinx.coroutines.InternalCoroutinesApi import kotlinx.coroutines.Job -import kotlinx.coroutines.flow.* -import kotlinx.io.core.use +import kotlinx.coroutines.flow.filter +import kotlinx.coroutines.flow.launchIn +import kotlinx.coroutines.flow.onEach import ru.mipt.npm.controls.api.DeviceMessage import ru.mipt.npm.controls.api.PropertyChangedMessage import ru.mipt.npm.controls.controllers.DeviceManager diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..fbaacb0 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,12 @@ +kotlin.code.style=official +kotlin.mpp.stability.nowarn=true + +kotlin.jupyter.add.scanner=false + +org.gradle.jvmargs=-XX:MaxMetaspaceSize=1G +org.gradle.parallel=true + +publishing.github=false +publishing.sonatype=false + +toolsVersion=0.10.9-kotlin-1.6.10 \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 827b689..6a4062d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,13 +1,13 @@ rootProject.name = "controls-kt" - enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") enableFeaturePreview("VERSION_CATALOGS") pluginManagement { - val toolsVersion = "0.10.5" + val toolsVersion: String by extra repositories { + mavenLocal() maven("https://repo.kotlin.link") mavenCentral() gradlePluginPortal() @@ -22,14 +22,18 @@ pluginManagement { } dependencyResolutionManagement { + + val toolsVersion: String by extra + repositories { + mavenLocal() maven("https://repo.kotlin.link") mavenCentral() } versionCatalogs { - create("npm") { - from("ru.mipt.npm:version-catalog:0.10.5") + create("npmlibs") { + from("ru.mipt.npm:version-catalog:$toolsVersion") } } }