From a67bda8a3331cc6b3e12764c3065e14881c742a6 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 27 Mar 2024 07:44:53 +0300 Subject: [PATCH] Adjust build --- attributes-kt/build.gradle.kts | 2 +- build.gradle.kts | 2 ++ examples/build.gradle.kts | 4 ++-- .../kotlin/space/kscience/kmath/optimization/XYFit.kt | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/attributes-kt/build.gradle.kts b/attributes-kt/build.gradle.kts index 5956f1f16..555567aac 100644 --- a/attributes-kt/build.gradle.kts +++ b/attributes-kt/build.gradle.kts @@ -3,7 +3,7 @@ plugins { `maven-publish` } -version = "0.1.0" +version = rootProject.extra.get("attributesVersion").toString() kscience { jvm() diff --git a/build.gradle.kts b/build.gradle.kts index ec82e8eeb..9ee719967 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,6 +6,8 @@ plugins { id("org.jetbrains.kotlinx.kover") version "0.7.6" } +val attributesVersion by extra("0.1.0") + allprojects { repositories { maven("https://repo.kotlin.link") diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 97a3cb8c2..b155f2653 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -67,8 +67,8 @@ kotlin { } tasks.withType { - kotlinOptions { - freeCompilerArgs = freeCompilerArgs + "-Xjvm-default=all" + "-Xopt-in=kotlin.RequiresOptIn" + "-Xlambdas=indy" + compilerOptions{ + freeCompilerArgs.addAll("-Xjvm-default=all", "-Xopt-in=kotlin.RequiresOptIn", "-Xlambdas=indy") } } diff --git a/kmath-optimization/src/commonMain/kotlin/space/kscience/kmath/optimization/XYFit.kt b/kmath-optimization/src/commonMain/kotlin/space/kscience/kmath/optimization/XYFit.kt index 3861a796d..a954b769a 100644 --- a/kmath-optimization/src/commonMain/kotlin/space/kscience/kmath/optimization/XYFit.kt +++ b/kmath-optimization/src/commonMain/kotlin/space/kscience/kmath/optimization/XYFit.kt @@ -124,7 +124,7 @@ public suspend fun XYColumnarData.fitWith( this, modelExpression, attributes.modify { - set(::OptimizationStartPoint, startingPoint) + set(OptimizationStartPoint(), startingPoint) if (!hasAny()) { set(OptimizationLog, Loggable.console) }