From a507f00f2fcfcac64c70b992ca1d96404c16193e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Wed, 5 Oct 2022 12:10:20 +0200 Subject: [PATCH 1/9] build: Created the 'state' module See https://gitlab.com/opensavvy/pedestal/-/issues/19 --- .gitlab-ci.yml | 18 +++++++++++++++++ backbone/build.gradle.kts | 2 +- settings.gradle.kts | 1 + spine/build.gradle.kts | 2 +- state/build.gradle.kts | 42 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 state/build.gradle.kts diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f003752..2d55907 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,6 +29,11 @@ logger:publish: variables: module: logger +state:publish: + extends: [ .publish ] + variables: + module: state + backbone:publish: extends: [ .publish ] variables: @@ -87,6 +92,19 @@ logger:convert-coverage: variables: module: logger +state:test:jvm: + extends: [ .test-jvm ] + variables: + module: state + +state:convert-coverage: + extends: [ .test-jvm-convert-coverage ] + needs: + - job: state:test:jvm + artifacts: true + variables: + module: state + backbone:test:jvm: extends: [ .test-jvm ] variables: diff --git a/backbone/build.gradle.kts b/backbone/build.gradle.kts index eaab266..848a207 100644 --- a/backbone/build.gradle.kts +++ b/backbone/build.gradle.kts @@ -14,7 +14,7 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - api(KotlinX.coroutines.core) + api(projects.state) api(KotlinX.datetime) implementation(projects.logger) diff --git a/settings.gradle.kts b/settings.gradle.kts index 51f95fa..1cc79ae 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -6,6 +6,7 @@ plugins { } include( + "state", "backbone", "spine", "spine-ktor-client", diff --git a/spine/build.gradle.kts b/spine/build.gradle.kts index ec8139e..4e2b806 100644 --- a/spine/build.gradle.kts +++ b/spine/build.gradle.kts @@ -15,7 +15,7 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - api(projects.backbone) + api(projects.state) api(KotlinX.serialization.core) implementation(projects.logger) diff --git a/state/build.gradle.kts b/state/build.gradle.kts new file mode 100644 index 0000000..ec84d18 --- /dev/null +++ b/state/build.gradle.kts @@ -0,0 +1,42 @@ +@file:Suppress("UNUSED_VARIABLE") + +plugins { + kotlin("multiplatform") +} + +kotlin { + jvm() + js(IR) { + browser() + nodejs() + } + + sourceSets { + val commonMain by getting { + dependencies { + api(KotlinX.coroutines.core) + + implementation(projects.logger) + } + } + + val commonTest by getting { + dependencies { + implementation(projects.tester) + + api(KotlinX.coroutines.test) + } + } + } +} + +kover { + verify { + rule { + name = "Minimal code coverage" + bound { + minValue = 80 + } + } + } +} -- 2.51.2 From b03b33f44f63c39bf4afddc4a0e39555ba03f609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Mon, 10 Oct 2022 14:27:43 +0200 Subject: [PATCH 2/9] build(idea): Always generate the coverage report when testing --- .idea/runConfigurations/All_tests.xml | 1 + .idea/runConfigurations/All_tests__JVM_.xml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.idea/runConfigurations/All_tests.xml b/.idea/runConfigurations/All_tests.xml index 40d3617..e7f139a 100644 --- a/.idea/runConfigurations/All_tests.xml +++ b/.idea/runConfigurations/All_tests.xml @@ -11,6 +11,7 @@