diff --git a/build.gradle.kts b/build.gradle.kts index e35fa92..cb7b2e4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,15 @@ +import space.kscience.gradle.isInDevelopment +import space.kscience.gradle.useApache2Licence +import space.kscience.gradle.useSPCTeam + plugins { id("space.kscience.gradle.project") } -val dataforgeVersion: String by extra("0.6.0-dev-13") +val dataforgeVersion: String by extra("0.6.0-dev-15") val ktorVersion: String by extra(space.kscience.gradle.KScienceVersions.ktorVersion) val rsocketVersion by extra("0.15.4") +val xodusVersion by extra("2.0.1") allprojects { group = "space.kscience" @@ -12,8 +17,19 @@ allprojects { } ksciencePublish { - github("controls.kt") - space("https://maven.pkg.jetbrains.space/mipt-npm/p/controls/maven") + pom("https://github.com/SciProgCentre/controls.kt") { + useApache2Licence() + useSPCTeam() + } + github("controls.kt", "SciProgCentre") + space( + if (isInDevelopment) { + "https://maven.pkg.jetbrains.space/spc/p/sci/dev" + } else { + "https://maven.pkg.jetbrains.space/spc/p/sci/release" + } + ) + space("https://maven.pkg.jetbrains.space/spc/p/controls/maven") } apiValidation { diff --git a/controls-core/build.gradle.kts b/controls-core/build.gradle.kts index 159e693..8585f17 100644 --- a/controls-core/build.gradle.kts +++ b/controls-core/build.gradle.kts @@ -1,25 +1,20 @@ plugins { id("space.kscience.gradle.mpp") - id("space.kscience.gradle.native") `maven-publish` } val dataforgeVersion: String by rootProject.extra kscience { + jvm() + js() + native() useCoroutines() useSerialization{ json() } -} - -kotlin { - sourceSets { - commonMain{ - dependencies { - api("space.kscience:dataforge-io:$dataforgeVersion") - api(npmlibs.kotlinx.datetime) - } - } + dependencies { + api("space.kscience:dataforge-io:$dataforgeVersion") + api(npmlibs.kotlinx.datetime) } -} \ No newline at end of file +} diff --git a/controls-magix-client/build.gradle.kts b/controls-magix-client/build.gradle.kts index 2105e37..a94e770 100644 --- a/controls-magix-client/build.gradle.kts +++ b/controls-magix-client/build.gradle.kts @@ -4,18 +4,13 @@ plugins { } kscience{ + jvm() + js() useSerialization { json() } -} - -kotlin { - sourceSets { - commonMain { - dependencies { - implementation(project(":magix:magix-rsocket")) - implementation(project(":controls-core")) - } - } + dependencies { + implementation(project(":magix:magix-rsocket")) + implementation(project(":controls-core")) } -} +} \ No newline at end of file diff --git a/controls-storage/build.gradle.kts b/controls-storage/build.gradle.kts index 80210e8..6bf1aa2 100644 --- a/controls-storage/build.gradle.kts +++ b/controls-storage/build.gradle.kts @@ -5,21 +5,16 @@ plugins { val dataforgeVersion: String by rootProject.extra -kotlin { - sourceSets { - commonMain { - dependencies { - api(projects.controlsCore) - } - } - - jvmMain { - dependencies { - api(projects.magix.magixApi) - api(projects.controlsMagixClient) - api(projects.magix.magixServer) - } - } +kscience{ + jvm() + js() + dependencies { + api(projects.controlsCore) + } + dependencies(jvmMain){ + api(projects.magix.magixApi) + api(projects.controlsMagixClient) + api(projects.magix.magixServer) } } diff --git a/controls-storage/controls-xodus/build.gradle.kts b/controls-storage/controls-xodus/build.gradle.kts index a912825..b745b0b 100644 --- a/controls-storage/controls-xodus/build.gradle.kts +++ b/controls-storage/controls-xodus/build.gradle.kts @@ -3,7 +3,7 @@ plugins { `maven-publish` } -val xodusVersion = "2.0.1" +val xodusVersion: String by rootProject.extra dependencies { api(projects.controlsStorage) diff --git a/demo/all-things/build.gradle.kts b/demo/all-things/build.gradle.kts index b52b1a5..1f86f1c 100644 --- a/demo/all-things/build.gradle.kts +++ b/demo/all-things/build.gradle.kts @@ -1,6 +1,6 @@ plugins { kotlin("jvm") - id("org.openjfx.javafxplugin") version "0.0.10" + id("org.openjfx.javafxplugin") version "0.0.13" application } @@ -37,7 +37,7 @@ tasks.withType().configureEach } javafx { - version = "14" + version = "17" modules("javafx.controls") } diff --git a/demo/motors/build.gradle.kts b/demo/motors/build.gradle.kts index 1427557..04f0d72 100644 --- a/demo/motors/build.gradle.kts +++ b/demo/motors/build.gradle.kts @@ -1,11 +1,16 @@ plugins { id("space.kscience.gradle.jvm") - `maven-publish` application + id("org.openjfx.javafxplugin") } //TODO to be moved to a separate project +javafx { + version = "17" + modules = listOf("javafx.controls") +} + application{ mainClass.set("ru.mipt.npm.devices.pimotionmaster.PiMotionMasterAppKt") } @@ -14,10 +19,6 @@ kotlin{ explicitApi = null } -kscience{ - useFx(space.kscience.gradle.FXModule.CONTROLS, configuration = space.kscience.gradle.DependencyConfiguration.IMPLEMENTATION) -} - val ktorVersion: String by rootProject.extra val dataforgeVersion: String by extra diff --git a/gradle.properties b/gradle.properties index 52d10eb..05b0759 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,4 +7,4 @@ org.gradle.parallel=true publishing.github=false publishing.sonatype=false -toolsVersion=0.12.0-kotlin-1.7.20-Beta \ No newline at end of file +toolsVersion=0.14.2-kotlin-1.8.10 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fc..070cb70 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/magix/magix-api/build.gradle.kts b/magix/magix-api/build.gradle.kts index 0a23e4c..5f8bdf3 100644 --- a/magix/magix-api/build.gradle.kts +++ b/magix/magix-api/build.gradle.kts @@ -1,10 +1,12 @@ plugins { id("space.kscience.gradle.mpp") - id("space.kscience.gradle.native") `maven-publish` } kscience { + jvm() + js() + native() useCoroutines() useSerialization{ json() diff --git a/magix/magix-java-client/build.gradle.kts b/magix/magix-java-client/build.gradle.kts index 798f9be..63041b3 100644 --- a/magix/magix-java-client/build.gradle.kts +++ b/magix/magix-java-client/build.gradle.kts @@ -12,10 +12,10 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk9:${KScienceVersions.coroutinesVersion}") } -java { - sourceCompatibility = KScienceVersions.JVM_TARGET - targetCompatibility = KScienceVersions.JVM_TARGET -} +//java { +// sourceCompatibility = KScienceVersions.JVM_TARGET +// targetCompatibility = KScienceVersions.JVM_TARGET +//} //FIXME https://youtrack.jetbrains.com/issue/KT-52815/Compiler-option-Xjdk-release-fails-to-compile-mixed-projects diff --git a/magix/magix-rsocket/build.gradle.kts b/magix/magix-rsocket/build.gradle.kts index 7f637b3..39aa8aa 100644 --- a/magix/magix-rsocket/build.gradle.kts +++ b/magix/magix-rsocket/build.gradle.kts @@ -1,6 +1,5 @@ plugins { id("space.kscience.gradle.mpp") - id("space.kscience.gradle.native") `maven-publish` } @@ -8,30 +7,29 @@ description = """ Magix endpoint (client) based on RSocket """.trimIndent() -kscience { - useSerialization { - json() - } -} - val ktorVersion: String by rootProject.extra val rsocketVersion: String by rootProject.extra +kscience { + jvm() + js() + native() + useSerialization { + json() + } + dependencies { + api(projects.magix.magixApi) + implementation("io.ktor:ktor-client-core:$ktorVersion") + implementation("io.rsocket.kotlin:rsocket-ktor-client:$rsocketVersion") + } + dependencies(jvmMain) { + implementation("io.rsocket.kotlin:rsocket-transport-ktor-tcp:$rsocketVersion") + } +} + kotlin { sourceSets { - commonMain { - dependencies { - api(projects.magix.magixApi) - implementation("io.ktor:ktor-client-core:$ktorVersion") - implementation("io.rsocket.kotlin:rsocket-ktor-client:$rsocketVersion") - } - } - jvmMain { - dependencies { - implementation("io.rsocket.kotlin:rsocket-transport-ktor-tcp:$rsocketVersion") - } - } - linuxX64Main{ + getByName("linuxX64Main") { dependencies { implementation("io.rsocket.kotlin:rsocket-transport-ktor-tcp:$rsocketVersion") } diff --git a/magix/magix-storage/magix-storage-xodus/build.gradle.kts b/magix/magix-storage/magix-storage-xodus/build.gradle.kts index 9019cf1..63a1b44 100644 --- a/magix/magix-storage/magix-storage-xodus/build.gradle.kts +++ b/magix/magix-storage/magix-storage-xodus/build.gradle.kts @@ -3,7 +3,7 @@ plugins { `maven-publish` } -val xodusVersion = "2.0.1" +val xodusVersion: String by rootProject.extra kscience{ useCoroutines() diff --git a/magix/magix-storage/magix-storage-xodus/src/main/kotlin/space/kscience/magix/storage/xodus/XodusMagixStorage.kt b/magix/magix-storage/magix-storage-xodus/src/main/kotlin/space/kscience/magix/storage/xodus/XodusMagixStorage.kt index 87e4096..39eb4ea 100644 --- a/magix/magix-storage/magix-storage-xodus/src/main/kotlin/space/kscience/magix/storage/xodus/XodusMagixStorage.kt +++ b/magix/magix-storage/magix-storage-xodus/src/main/kotlin/space/kscience/magix/storage/xodus/XodusMagixStorage.kt @@ -46,7 +46,7 @@ public class XodusMagixStorage( } }.launchIn(scope) - private fun Entity.parseMagixMessage(): MagixMessage = MagixMessage( + private fun Entity.parseMagixMessage(): MagixMessage = MagixMessage( format = getProperty(MagixMessage::format.name).toString(), payload = getBlobString(MagixMessage::payload.name)?.let { magixJson.parseToJsonElement(it) diff --git a/settings.gradle.kts b/settings.gradle.kts index 5b2bf00..de36d30 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,6 +19,7 @@ pluginManagement { id("space.kscience.gradle.mpp") version toolsVersion id("space.kscience.gradle.jvm") version toolsVersion id("space.kscience.gradle.js") version toolsVersion + id("org.openjfx.javafxplugin") version "0.0.13" } }