diff --git a/benchmarks/build.gradle b/benchmarks/build.gradle index 989590397..7c948e219 100644 --- a/benchmarks/build.gradle +++ b/benchmarks/build.gradle @@ -21,7 +21,7 @@ dependencies { //jmh project(':kmath-core') } -jmh{ +jmh { warmupIterations = 1 } diff --git a/buildSrc/src/main/kotlin/multiplatform-config.gradle.kts b/buildSrc/src/main/kotlin/multiplatform-config.gradle.kts index dddb51730..1d40a1114 100644 --- a/buildSrc/src/main/kotlin/multiplatform-config.gradle.kts +++ b/buildSrc/src/main/kotlin/multiplatform-config.gradle.kts @@ -11,6 +11,8 @@ kotlin { compilations.all { kotlinOptions { jvmTarget = "1.8" + // This was used in kmath-koma, but probably if we need it better to apply it for all modules + //freeCompilerArgs += "-progressive" } } } diff --git a/kmath-core/build.gradle.kts b/kmath-core/build.gradle.kts index 6faba5a1b..b24d41a87 100644 --- a/kmath-core/build.gradle.kts +++ b/kmath-core/build.gradle.kts @@ -1,20 +1,14 @@ plugins { - id("multiplatform-config") + `multiplatform-config` } -val ioVersion: String by rootProject.extra - - -kotlin { - sourceSets { - commonMain { - dependencies { - api(project(":kmath-memory")) - } +kotlin.sourceSets { + commonMain { + dependencies { + api(project(":kmath-memory")) } -// mingwMain { -// } -// mingwTest { -// } } + //mingwMain {} + //mingwTest {} } + diff --git a/kmath-coroutines/build.gradle.kts b/kmath-coroutines/build.gradle.kts index 627b475d5..e72514803 100644 --- a/kmath-coroutines/build.gradle.kts +++ b/kmath-coroutines/build.gradle.kts @@ -1,41 +1,22 @@ plugins { - id("multiplatform-config") + `multiplatform-config` } -kotlin { - sourceSets { - commonMain { - dependencies { - api(project(":kmath-core")) - api("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:${Ver.coroutinesVersion}") - } +kotlin.sourceSets { + commonMain { + dependencies { + api(project(":kmath-core")) + api("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:${Ver.coroutinesVersion}") } - commonTest { - dependencies { - implementation(kotlin("test-common")) - implementation(kotlin("test-annotations-common")) - } + } + jvmMain { + dependencies { + api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Ver.coroutinesVersion}") } - jvmMain { - dependencies { - api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Ver.coroutinesVersion}") - } - } - jvmTest { - dependencies { - implementation(kotlin("test")) - implementation(kotlin("test-junit")) - } - } - jsMain { - dependencies { - api("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:${Ver.coroutinesVersion}") - } - } - jsTest { - dependencies { - implementation(kotlin("test-js")) - } + } + jsMain { + dependencies { + api("org.jetbrains.kotlinx:kotlinx-coroutines-core-js:${Ver.coroutinesVersion}") } } } diff --git a/kmath-histograms/build.gradle.kts b/kmath-histograms/build.gradle.kts index 61eb61a43..a65115f90 100644 --- a/kmath-histograms/build.gradle.kts +++ b/kmath-histograms/build.gradle.kts @@ -1,30 +1,10 @@ plugins { - id("multiplatform-config") + `multiplatform-config` } -kotlin { - sourceSets { - commonMain { - dependencies { - api(project(":kmath-core")) - } - } - commonTest { - dependencies { - implementation(kotlin("test-common")) - implementation(kotlin("test-annotations-common")) - } - } - jvmTest { - dependencies { - implementation(kotlin("test")) - implementation(kotlin("test-junit")) - } - } - jsTest { - dependencies { - implementation(kotlin("test-js")) - } - } +// Just an example how we can collapse nested DSL for simple declarations +kotlin.sourceSets.commonMain { + dependencies { + api(project(":kmath-core")) } } diff --git a/kmath-koma/build.gradle.kts b/kmath-koma/build.gradle.kts index 4270ab7d5..5942182d5 100644 --- a/kmath-koma/build.gradle.kts +++ b/kmath-koma/build.gradle.kts @@ -1,54 +1,31 @@ plugins { - id("multiplatform-config") + `multiplatform-config` } repositories { maven("http://dl.bintray.com/kyonifer/maven") } -kotlin { - jvm { - compilations.all { - kotlinOptions { - freeCompilerArgs += "-progressive" - } +kotlin.sourceSets { + commonMain { + dependencies { + api(project(":kmath-core")) + api("com.kyonifer:koma-core-api-common:0.12") } } - - sourceSets { - commonMain { - dependencies { - api(project(":kmath-core")) - api("com.kyonifer:koma-core-api-common:0.12") - } + jvmMain { + dependencies { + api("com.kyonifer:koma-core-api-jvm:0.12") } - commonTest { - dependencies { - implementation(kotlin("test-common")) - implementation(kotlin("test-annotations-common")) - } + } + jvmTest { + dependencies { + implementation("com.kyonifer:koma-core-ejml:0.12") } - jvmMain { - dependencies { - api("com.kyonifer:koma-core-api-jvm:0.12") - } - } - jvmTest { - dependencies { - implementation(kotlin("test")) - implementation(kotlin("test-junit")) - implementation("com.kyonifer:koma-core-ejml:0.12") - } - } - jsMain { - dependencies { - api("com.kyonifer:koma-core-api-js:0.12") - } - } - jsTest { - dependencies { - implementation(kotlin("test-js")) - } + } + jsMain { + dependencies { + api("com.kyonifer:koma-core-api-js:0.12") } } } diff --git a/kmath-memory/build.gradle.kts b/kmath-memory/build.gradle.kts index e23030fba..c42d35c3a 100644 --- a/kmath-memory/build.gradle.kts +++ b/kmath-memory/build.gradle.kts @@ -1,3 +1,3 @@ plugins { - id("multiplatform-config") + `multiplatform-config` } diff --git a/kmath-sequential/build.gradle.kts b/kmath-sequential/build.gradle.kts index 8d24f8cc9..26449f6d4 100644 --- a/kmath-sequential/build.gradle.kts +++ b/kmath-sequential/build.gradle.kts @@ -1,29 +1,27 @@ plugins { - id("multiplatform-config") + `multiplatform-config` id("kotlinx-atomicfu") version Ver.atomicfuVersion } -kotlin { - sourceSets { - commonMain { - dependencies { - api(project(":kmath-core")) - api(project(":kmath-coroutines")) - compileOnly("org.jetbrains.kotlinx:atomicfu-common:${Ver.atomicfuVersion}") - } +kotlin.sourceSets { + commonMain { + dependencies { + api(project(":kmath-core")) + api(project(":kmath-coroutines")) + compileOnly("org.jetbrains.kotlinx:atomicfu-common:${Ver.atomicfuVersion}") } - jvmMain { - dependencies { - compileOnly("org.jetbrains.kotlinx:atomicfu:${Ver.atomicfuVersion}") - } - } - jsMain { - dependencies { - compileOnly("org.jetbrains.kotlinx:atomicfu-js:${Ver.atomicfuVersion}") - } - } - } + jvmMain { + dependencies { + compileOnly("org.jetbrains.kotlinx:atomicfu:${Ver.atomicfuVersion}") + } + } + jsMain { + dependencies { + compileOnly("org.jetbrains.kotlinx:atomicfu-js:${Ver.atomicfuVersion}") + } + } + } atomicfu {