From 72340705fec950f2eb157025b4e75857c8f454ce Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 12 Sep 2020 14:59:12 +0300 Subject: [PATCH 1/3] Build refactor --- build.gradle.kts | 12 +++++++++++- .../kotlin/scientifik/kmath/operations/BigIntDemo.kt | 8 ++++++++ kmath-core/build.gradle.kts | 11 ++++++++--- kmath-memory/build.gradle.kts | 5 +++-- settings.gradle.kts | 10 +--------- 5 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 examples/src/main/kotlin/scientifik/kmath/operations/BigIntDemo.kt diff --git a/build.gradle.kts b/build.gradle.kts index 8a2ba3617..b1749bb98 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,8 +14,18 @@ allprojects { maven("https://dl.bintray.com/hotkeytlt/maven") } - group = "scientifik" + group = "kscience.kmath" version = kmathVersion + + afterEvaluate { + extensions.findByType()?.run { + targets.all { + sourceSets.all { + languageSettings.useExperimentalAnnotation("kotlin.contracts.ExperimentalContracts") + } + } + } + } } subprojects { diff --git a/examples/src/main/kotlin/scientifik/kmath/operations/BigIntDemo.kt b/examples/src/main/kotlin/scientifik/kmath/operations/BigIntDemo.kt new file mode 100644 index 000000000..10b038943 --- /dev/null +++ b/examples/src/main/kotlin/scientifik/kmath/operations/BigIntDemo.kt @@ -0,0 +1,8 @@ +package scientifik.kmath.operations + +fun main() { + val res = BigIntField { + number(1) * 2 + } + println("bigint:$res") +} \ No newline at end of file diff --git a/kmath-core/build.gradle.kts b/kmath-core/build.gradle.kts index 7f9922de4..18c0cc771 100644 --- a/kmath-core/build.gradle.kts +++ b/kmath-core/build.gradle.kts @@ -1,6 +1,11 @@ -plugins { id("scientifik.mpp") } +plugins { + id("scientifik.mpp") +} kotlin.sourceSets { - all { languageSettings.useExperimentalAnnotation("kotlin.contracts.ExperimentalContracts") } - commonMain { dependencies { api(project(":kmath-memory")) } } + commonMain { + dependencies { + api(project(":kmath-memory")) + } + } } diff --git a/kmath-memory/build.gradle.kts b/kmath-memory/build.gradle.kts index 44a5ae24d..75b4f174e 100644 --- a/kmath-memory/build.gradle.kts +++ b/kmath-memory/build.gradle.kts @@ -1,2 +1,3 @@ -plugins { id("scientifik.mpp") } -kotlin.sourceSets.all { languageSettings.useExperimentalAnnotation("kotlin.contracts.ExperimentalContracts") } +plugins { + id("scientifik.mpp") +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 487e1d87f..6601fd053 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,6 @@ pluginManagement { - val toolsVersion = "0.5.0" + val toolsVersion = "0.5.2" plugins { id("kotlinx.benchmark") version "0.2.0-dev-8" @@ -20,14 +20,6 @@ pluginManagement { maven("https://dl.bintray.com/mipt-npm/dev") maven("https://dl.bintray.com/kotlin/kotlinx") } - - resolutionStrategy { - eachPlugin { - when (requested.id.id) { - "scientifik.mpp", "scientifik.jvm", "scientifik.publish" -> useModule("scientifik:gradle-tools:$toolsVersion") - } - } - } } rootProject.name = "kmath" From ec08bec42f95736ef1862764e324511dae810342 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Mon, 14 Sep 2020 22:34:45 +0300 Subject: [PATCH 2/3] 0.1.4 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index b1749bb98..0ef0453dd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,7 @@ plugins { id("scientifik.publish") apply false } -val kmathVersion by extra("0.1.4-dev-8") +val kmathVersion by extra("0.1.4") val bintrayRepo by extra("scientifik") val githubProject by extra("kmath") From 139525e2d4adea90e62e80881ec551ca54e3c6a4 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Mon, 14 Sep 2020 22:48:02 +0300 Subject: [PATCH 3/3] Patch changelog --- CHANGELOG.md | 12 ++++++++++++ build.gradle.kts | 1 + 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3944c673e..4bcc57810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ # KMath ## [Unreleased] +### Added + +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Security +## [0.1.4] ### Added - Functional Expressions API diff --git a/build.gradle.kts b/build.gradle.kts index 0ef0453dd..b24ecd15b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,6 @@ plugins { id("scientifik.publish") apply false + id("org.jetbrains.changelog") version "0.4.0" } val kmathVersion by extra("0.1.4")