From 4abd0bdb6f2e1ea8f7df878b257ec93b2fdf3554 Mon Sep 17 00:00:00 2001 From: darksnake Date: Sat, 10 Apr 2021 16:31:08 +0300 Subject: [PATCH] Migrate to gradle 7.0 and suspend-inline bug --- gradle/wrapper/gradle-wrapper.properties | 2 +- .../space/kscience/kmath/stat/CommonsDistributionsTest.kt | 2 +- settings.gradle.kts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f371643ee..442d9132e 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.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/kmath-stat/src/jvmTest/kotlin/space/kscience/kmath/stat/CommonsDistributionsTest.kt b/kmath-stat/src/jvmTest/kotlin/space/kscience/kmath/stat/CommonsDistributionsTest.kt index 976020f08..dca0242fc 100644 --- a/kmath-stat/src/jvmTest/kotlin/space/kscience/kmath/stat/CommonsDistributionsTest.kt +++ b/kmath-stat/src/jvmTest/kotlin/space/kscience/kmath/stat/CommonsDistributionsTest.kt @@ -13,7 +13,7 @@ internal class CommonsDistributionsTest { fun testNormalDistributionSuspend() = runBlocking { val distribution = GaussianSampler(7.0, 2.0) val generator = RandomGenerator.default(1) - val sample = distribution.sample(generator).take(1000).toList().asBuffer() + val sample = distribution.sample(generator).take(1000).toList().toDoubleArray().asBuffer() Assertions.assertEquals(7.0, Mean.double(sample), 0.2) } diff --git a/settings.gradle.kts b/settings.gradle.kts index e419ac0e2..1f62b1388 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,6 +17,7 @@ pluginManagement { id("ru.mipt.npm.gradle.jvm") version toolsVersion id("ru.mipt.npm.gradle.publish") version toolsVersion kotlin("jvm") version kotlinVersion + kotlin("multiplatform") version kotlinVersion kotlin("plugin.allopen") version kotlinVersion } }