diff --git a/README.md b/README.md index e4abe8d..5929ca6 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ repositories { // You can now add a dependency on the various modules: dependencies { - implementation("opensavvy.pedestal:backbone:") + implementation("dev.opensavvy.pedestal:backbone:") } ``` diff --git a/gradle/conventions/library/build.gradle.kts b/gradle/conventions/library/build.gradle.kts index 8e31a17..6457d17 100644 --- a/gradle/conventions/library/build.gradle.kts +++ b/gradle/conventions/library/build.gradle.kts @@ -1,10 +1,8 @@ -import org.gradle.kotlin.dsl.`kotlin-dsl` - plugins { `kotlin-dsl` } -group = "opensavvy.pedestal" +group = "dev.opensavvy.pedestal" dependencies { implementation(project(":versioning")) diff --git a/gradle/conventions/structure/build.gradle.kts b/gradle/conventions/structure/build.gradle.kts index 9539677..e82c514 100644 --- a/gradle/conventions/structure/build.gradle.kts +++ b/gradle/conventions/structure/build.gradle.kts @@ -1,10 +1,8 @@ -import org.gradle.kotlin.dsl.`kotlin-dsl` - plugins { `kotlin-dsl` } -group = "opensavvy.pedestal" +group = "dev.opensavvy.pedestal" dependencies { implementation(project(":versioning")) diff --git a/gradle/conventions/versioning/build.gradle.kts b/gradle/conventions/versioning/build.gradle.kts index 73da9ca..c897a87 100644 --- a/gradle/conventions/versioning/build.gradle.kts +++ b/gradle/conventions/versioning/build.gradle.kts @@ -1,10 +1,8 @@ -import org.gradle.kotlin.dsl.`kotlin-dsl` - plugins { `kotlin-dsl` } -group = "opensavvy.pedestal" +group = "dev.opensavvy.pedestal" dependencies { implementation("com.palantir.gradle.gitversion:gradle-git-version:_") diff --git a/gradle/conventions/versioning/src/main/kotlin/versioning.gradle.kts b/gradle/conventions/versioning/src/main/kotlin/versioning.gradle.kts index 6cf1061..4cd3f6f 100644 --- a/gradle/conventions/versioning/src/main/kotlin/versioning.gradle.kts +++ b/gradle/conventions/versioning/src/main/kotlin/versioning.gradle.kts @@ -1,8 +1,5 @@ package opensavvy.gradle -import org.gradle.kotlin.dsl.extra -import org.gradle.kotlin.dsl.invoke - plugins { id("com.palantir.git-version") } @@ -17,5 +14,5 @@ fun calculateVersion(): String { "${details.lastTag}-post.${details.commitDistance}+${details.gitHash}" } -group = "opensavvy.pedestal" +group = "dev.opensavvy.pedestal" version = calculateVersion() -- 2.51.2 From aa2ecdc6f13c24c8085ffc3a0fd8d68b142a392a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Thu, 27 Jul 2023 21:03:26 +0200 Subject: [PATCH 2/8] ci(gitlab): Simplify the publication pipeline --- .gitlab-ci.yml | 50 +++++--------------------------------------------- 1 file changed, 5 insertions(+), 45 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a7acde..1c3fbfd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,19 +40,7 @@ publish: script: - > ./gradlew - logger:publishAllPublicationsToGitLabRepository - progress:publishAllPublicationsToGitLabRepository - progress-coroutines:publishAllPublicationsToGitLabRepository - state:publishAllPublicationsToGitLabRepository - state-arrow:publishAllPublicationsToGitLabRepository - state-coroutines:publishAllPublicationsToGitLabRepository - cache:publishAllPublicationsToGitLabRepository - backbone:publishAllPublicationsToGitLabRepository - logger:publishAllPublicationsToGitLabRepository - spine:publishAllPublicationsToGitLabRepository - spine-ktor:publishAllPublicationsToGitLabRepository - spine-ktor:spine-ktor-client:publishAllPublicationsToGitLabRepository - spine-ktor:spine-ktor-server:publishAllPublicationsToGitLabRepository + publishAllPublicationsToGitLabRepository rules: - if: $CI_COMMIT_TAG interruptible: false @@ -62,38 +50,10 @@ publish:ios: stage: publish script: - > - ./gradlew - logger:publishIosArm64PublicationToGitLabRepository - progress:publishIosArm64PublicationToGitLabRepository - progress-coroutines:publishIosArm64PublicationToGitLabRepository - state:publishIosArm64PublicationToGitLabRepository - state-arrow:publishIosArm64PublicationToGitLabRepository - state-coroutines:publishIosArm64PublicationToGitLabRepository - cache:publishIosArm64PublicationToGitLabRepository - backbone:publishIosArm64PublicationToGitLabRepository - logger:publishIosArm64PublicationToGitLabRepository - - > - ./gradlew - logger:publishIosSimulatorArm64PublicationToGitLabRepository - progress:publishIosSimulatorArm64PublicationToGitLabRepository - progress-coroutines:publishIosSimulatorArm64PublicationToGitLabRepository - state:publishIosSimulatorArm64PublicationToGitLabRepository - state-arrow:publishIosSimulatorArm64PublicationToGitLabRepository - state-coroutines:publishIosSimulatorArm64PublicationToGitLabRepository - cache:publishIosSimulatorArm64PublicationToGitLabRepository - backbone:publishIosSimulatorArm64PublicationToGitLabRepository - logger:publishIosSimulatorArm64PublicationToGitLabRepository - - > - ./gradlew - logger:publishIosX64PublicationToGitLabRepository - progress:publishIosX64PublicationToGitLabRepository - progress-coroutines:publishIosX64PublicationToGitLabRepository - state:publishIosX64PublicationToGitLabRepository - state-arrow:publishIosX64PublicationToGitLabRepository - state-coroutines:publishIosX64PublicationToGitLabRepository - cache:publishIosX64PublicationToGitLabRepository - backbone:publishIosX64PublicationToGitLabRepository - logger:publishIosX64PublicationToGitLabRepository + ./gradlew + publishIosArm64PublicationToGitLabRepository + publishIosSimulatorArm64PublicationToGitLabRepository + publishIosX64PublicationToGitLabRepository rules: - if: $CI_COMMIT_TAG interruptible: false -- 2.51.2 From e0892b115591129fa253db6eef4b93b472762577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Thu, 27 Jul 2023 21:50:20 +0200 Subject: [PATCH 3/8] build: Configure the requirements for Maven Central --- backbone/build.gradle.kts | 6 ++ cache-blocking/build.gradle.kts | 6 ++ cache/build.gradle.kts | 6 ++ .../src/main/kotlin/structure.gradle.kts | 72 +++++++++++++++++++ logger/build.gradle.kts | 6 ++ progress-coroutines/build.gradle.kts | 6 ++ progress/build.gradle.kts | 6 ++ spine-ktor/build.gradle.kts | 6 ++ spine-ktor/spine-ktor-client/build.gradle.kts | 6 ++ spine-ktor/spine-ktor-server/build.gradle.kts | 6 ++ spine/build.gradle.kts | 6 ++ state-arrow/build.gradle.kts | 6 ++ state-coroutines/build.gradle.kts | 6 ++ state/build.gradle.kts | 6 ++ tester/build.gradle.kts | 6 ++ 15 files changed, 156 insertions(+) diff --git a/backbone/build.gradle.kts b/backbone/build.gradle.kts index f0b1258..0d43332 100644 --- a/backbone/build.gradle.kts +++ b/backbone/build.gradle.kts @@ -38,6 +38,12 @@ kotlin { } } +metadata { + name.set("Pedestal Backbone") + description.set("Layered software architecture with aggressive caching") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/backbone/index.html") +} + kover { verify { rule { diff --git a/cache-blocking/build.gradle.kts b/cache-blocking/build.gradle.kts index 3612eba..426051e 100644 --- a/cache-blocking/build.gradle.kts +++ b/cache-blocking/build.gradle.kts @@ -28,6 +28,12 @@ kotlin { } } +metadata { + name.set("Pedestal Cache (Blocking)") + description.set("Blocking wrappers for Pedestal Cache") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/cache-blocking/index.html") +} + tasks.withType().configureEach { dokkaSourceSets.configureEach { includes.from("${project.projectDir}/README.md") diff --git a/cache/build.gradle.kts b/cache/build.gradle.kts index 866ed1c..1ffe685 100644 --- a/cache/build.gradle.kts +++ b/cache/build.gradle.kts @@ -36,6 +36,12 @@ kotlin { } } +metadata { + name.set("Pedestal Cache") + description.set("Multiplatform observable asynchronous cache algorithms") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/cache/index.html") +} + kover { verify { rule { diff --git a/gradle/conventions/structure/src/main/kotlin/structure.gradle.kts b/gradle/conventions/structure/src/main/kotlin/structure.gradle.kts index d3f7f7e..416c41f 100644 --- a/gradle/conventions/structure/src/main/kotlin/structure.gradle.kts +++ b/gradle/conventions/structure/src/main/kotlin/structure.gradle.kts @@ -6,9 +6,18 @@ plugins { id("org.jetbrains.dokka") id("opensavvy.gradle.versioning") id("maven-publish") + id("signing") id("org.jetbrains.kotlinx.kover") } +interface StructureExtension { + val name: Property + val description: Property + val homeUrl: Property +} + +val config = extensions.create("metadata") + repositories { mavenCentral() } @@ -33,7 +42,15 @@ tasks.withType().configureEach { } } +val javadocJar by tasks.registering(Jar::class) { + description = "Fake documentation JAR for MavenCentral" + group = "publishing" + + archiveClassifier.set("javadoc") +} + publishing { + // region GitLab artifact registry repositories { val projectId = System.getenv("CI_PROJECT_ID") val token = System.getenv("CI_JOB_TOKEN") @@ -55,8 +72,63 @@ publishing { } } } + // endregion + // region Maven Central + repositories { + val centralUsername = System.getenv("OSSRH_USERNAME") + val centralPassword = System.getenv("OSSRH_PASSWORD") + + if (centralUsername != null && centralPassword != null) { + maven { + name = "Sonatype" + url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") + credentials { + username = centralUsername + password = centralPassword + } + } + } + } + // endregion + + publications.withType { + artifact(javadocJar.get()) + + pom { + name.set(config.name) + description.set(config.description) + url.set(config.homeUrl) + + licenses { + license { + name.set("Apache 2.0") + url.set("https://gitlab.com/opensavvy/pedestal/-/raw/main/LICENSE.txt") + } + } + developers { + developer { + id.set("clovis-ai") + name.set("Ivan “CLOVIS” Canet") + email.set("ivan.canet@gmail.com") + } + } + scm { + url.set("https://gitlab.com/opensavvy/pedestal") + } + } + } } tasks.withType().configureEach { maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1 } + +run { + ext["signing.keyId"] = System.getenv("SIGNING_KEY_ID") ?: return@run + ext["signing.password"] = System.getenv("SIGNING_PASSWORD") ?: return@run + ext["signing.secretKeyRingFile"] = System.getenv("SIGNING_KEY_RING") ?: return@run + + signing { + sign(publishing.publications) + } +} diff --git a/logger/build.gradle.kts b/logger/build.gradle.kts index e0a5eb9..b419ca6 100644 --- a/logger/build.gradle.kts +++ b/logger/build.gradle.kts @@ -37,6 +37,12 @@ kotlin { } } +metadata { + name.set("Pedestal Logger") + description.set("Simple multiplatform logger") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/logger/index.html") +} + kover { verify { rule { diff --git a/progress-coroutines/build.gradle.kts b/progress-coroutines/build.gradle.kts index 48af315..6975601 100644 --- a/progress-coroutines/build.gradle.kts +++ b/progress-coroutines/build.gradle.kts @@ -36,6 +36,12 @@ kotlin { } } +metadata { + name.set("Pedestal Progress (Kotlin Coroutines compatibility)") + description.set("Coroutine-aware universal progress representation") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/progress-coroutines/index.html") +} + kover { verify { rule { diff --git a/progress/build.gradle.kts b/progress/build.gradle.kts index 052b103..796f7a2 100644 --- a/progress/build.gradle.kts +++ b/progress/build.gradle.kts @@ -33,6 +33,12 @@ kotlin { } } +metadata { + name.set("Pedestal Progress") + description.set("Universal progress representation") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/progress/index.html") +} + kover { verify { rule { diff --git a/spine-ktor/build.gradle.kts b/spine-ktor/build.gradle.kts index a45229e..0c9a310 100644 --- a/spine-ktor/build.gradle.kts +++ b/spine-ktor/build.gradle.kts @@ -47,3 +47,9 @@ kover { } } } + +metadata { + name.set("Spine for Ktor (DEPRECATED)") + description.set("Multiplatform API declaration") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/spine-ktor/index.html") +} diff --git a/spine-ktor/spine-ktor-client/build.gradle.kts b/spine-ktor/spine-ktor-client/build.gradle.kts index 00fc4e2..c43aa0e 100644 --- a/spine-ktor/spine-ktor-client/build.gradle.kts +++ b/spine-ktor/spine-ktor-client/build.gradle.kts @@ -31,3 +31,9 @@ kotlin { } } } + +metadata { + name.set("Spine for Ktor client (DEPRECATED)") + description.set("Multiplatform API declaration") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/spine-ktor/spine-ktor-client/index.html") +} diff --git a/spine-ktor/spine-ktor-server/build.gradle.kts b/spine-ktor/spine-ktor-server/build.gradle.kts index a767f3a..fb27c31 100644 --- a/spine-ktor/spine-ktor-server/build.gradle.kts +++ b/spine-ktor/spine-ktor-server/build.gradle.kts @@ -37,3 +37,9 @@ kotlin { } } } + +metadata { + name.set("Spine for Ktor server (DEPRECATED)") + description.set("Multiplatform API declaration") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/spine-ktor/spine-ktor-server/index.html") +} diff --git a/spine/build.gradle.kts b/spine/build.gradle.kts index b539083..dd29ee8 100644 --- a/spine/build.gradle.kts +++ b/spine/build.gradle.kts @@ -35,3 +35,9 @@ kotlin { } } } + +metadata { + name.set("Spine (DEPRECATED)") + description.set("Multiplatform API declaration") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/spine/index.html") +} diff --git a/state-arrow/build.gradle.kts b/state-arrow/build.gradle.kts index d46e1f1..4ca7f43 100644 --- a/state-arrow/build.gradle.kts +++ b/state-arrow/build.gradle.kts @@ -36,6 +36,12 @@ kotlin { } } +metadata { + name.set("Pedestal State (Arrow compatibility)") + description.set("Progress-aware failure states") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/state-arrow/index.html") +} + kover { verify { rule { diff --git a/state-coroutines/build.gradle.kts b/state-coroutines/build.gradle.kts index 39dfcbc..b15acb1 100644 --- a/state-coroutines/build.gradle.kts +++ b/state-coroutines/build.gradle.kts @@ -39,6 +39,12 @@ kotlin { } } +metadata { + name.set("Pedestal State (Kotlin Coroutines compatibility)") + description.set("Progress-aware failure states") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/state-coroutines/index.html") +} + kover { verify { rule { diff --git a/state/build.gradle.kts b/state/build.gradle.kts index 4bb5150..e810909 100644 --- a/state/build.gradle.kts +++ b/state/build.gradle.kts @@ -37,6 +37,12 @@ kotlin { } } +metadata { + name.set("Pedestal State") + description.set("Progress-aware failure states") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/state/index.html") +} + kover { verify { rule { diff --git a/tester/build.gradle.kts b/tester/build.gradle.kts index cdaef8a..d5b6c6f 100644 --- a/tester/build.gradle.kts +++ b/tester/build.gradle.kts @@ -42,3 +42,9 @@ kotlin { val iosX64Main by getting { iosMain.dependsOn(this) } } } + +metadata { + name.set("Pedestal Tester (DEPRECATED)") + description.set("Multiplatform test helpers") + homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/tester/index.html") +} -- 2.51.2 From 3dfe480d241d093ca7ac8edf1d8264b32c248d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Thu, 27 Jul 2023 21:57:40 +0200 Subject: [PATCH 4/8] build: Simplify the code coverage configuration --- backbone/build.gradle.kts | 11 +---------- cache/build.gradle.kts | 11 +---------- .../structure/src/main/kotlin/structure.gradle.kts | 13 +++++++++++++ logger/build.gradle.kts | 11 +---------- progress-coroutines/build.gradle.kts | 11 +---------- progress/build.gradle.kts | 11 +---------- state-arrow/build.gradle.kts | 11 +---------- state-coroutines/build.gradle.kts | 11 +---------- state/build.gradle.kts | 11 +---------- 9 files changed, 21 insertions(+), 80 deletions(-) diff --git a/backbone/build.gradle.kts b/backbone/build.gradle.kts index 0d43332..d490982 100644 --- a/backbone/build.gradle.kts +++ b/backbone/build.gradle.kts @@ -42,17 +42,8 @@ metadata { name.set("Pedestal Backbone") description.set("Layered software architecture with aggressive caching") homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/backbone/index.html") -} -kover { - verify { - rule { - name = "Minimal code coverage" - bound { - minValue = 80 - } - } - } + minimalCoverage.set(80) } tasks.withType().configureEach { diff --git a/cache/build.gradle.kts b/cache/build.gradle.kts index 1ffe685..c0dbb64 100644 --- a/cache/build.gradle.kts +++ b/cache/build.gradle.kts @@ -40,17 +40,8 @@ metadata { name.set("Pedestal Cache") description.set("Multiplatform observable asynchronous cache algorithms") homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/cache/index.html") -} -kover { - verify { - rule { - name = "Minimal code coverage" - bound { - minValue = 90 - } - } - } + minimalCoverage.set(90) } tasks.withType().configureEach { diff --git a/gradle/conventions/structure/src/main/kotlin/structure.gradle.kts b/gradle/conventions/structure/src/main/kotlin/structure.gradle.kts index 416c41f..453ff6e 100644 --- a/gradle/conventions/structure/src/main/kotlin/structure.gradle.kts +++ b/gradle/conventions/structure/src/main/kotlin/structure.gradle.kts @@ -14,6 +14,8 @@ interface StructureExtension { val name: Property val description: Property val homeUrl: Property + + val minimalCoverage: Property } val config = extensions.create("metadata") @@ -42,6 +44,17 @@ tasks.withType().configureEach { } } +kover { + verify { + rule { + name = "Minimal code coverage" + bound { + minValue = config.minimalCoverage.orNull + } + } + } +} + val javadocJar by tasks.registering(Jar::class) { description = "Fake documentation JAR for MavenCentral" group = "publishing" diff --git a/logger/build.gradle.kts b/logger/build.gradle.kts index b419ca6..c209fd4 100644 --- a/logger/build.gradle.kts +++ b/logger/build.gradle.kts @@ -41,17 +41,8 @@ metadata { name.set("Pedestal Logger") description.set("Simple multiplatform logger") homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/logger/index.html") -} -kover { - verify { - rule { - name = "Minimal code coverage" - bound { - minValue = 90 - } - } - } + minimalCoverage.set(90) } tasks.withType().configureEach { diff --git a/progress-coroutines/build.gradle.kts b/progress-coroutines/build.gradle.kts index 6975601..427c78c 100644 --- a/progress-coroutines/build.gradle.kts +++ b/progress-coroutines/build.gradle.kts @@ -40,17 +40,8 @@ metadata { name.set("Pedestal Progress (Kotlin Coroutines compatibility)") description.set("Coroutine-aware universal progress representation") homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/progress-coroutines/index.html") -} -kover { - verify { - rule { - name = "Minimal code coverage" - bound { - minValue = 90 - } - } - } + minimalCoverage.set(90) } tasks.withType().configureEach { diff --git a/progress/build.gradle.kts b/progress/build.gradle.kts index 796f7a2..637ce6d 100644 --- a/progress/build.gradle.kts +++ b/progress/build.gradle.kts @@ -37,17 +37,8 @@ metadata { name.set("Pedestal Progress") description.set("Universal progress representation") homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/progress/index.html") -} -kover { - verify { - rule { - name = "Minimal code coverage" - bound { - minValue = 90 - } - } - } + minimalCoverage.set(90) } tasks.withType().configureEach { diff --git a/state-arrow/build.gradle.kts b/state-arrow/build.gradle.kts index 4ca7f43..50a7384 100644 --- a/state-arrow/build.gradle.kts +++ b/state-arrow/build.gradle.kts @@ -40,17 +40,8 @@ metadata { name.set("Pedestal State (Arrow compatibility)") description.set("Progress-aware failure states") homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/state-arrow/index.html") -} -kover { - verify { - rule { - name = "Minimal code coverage" - bound { - minValue = 80 - } - } - } + minimalCoverage.set(80) } tasks.withType().configureEach { diff --git a/state-coroutines/build.gradle.kts b/state-coroutines/build.gradle.kts index b15acb1..79428cb 100644 --- a/state-coroutines/build.gradle.kts +++ b/state-coroutines/build.gradle.kts @@ -43,17 +43,8 @@ metadata { name.set("Pedestal State (Kotlin Coroutines compatibility)") description.set("Progress-aware failure states") homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/state-coroutines/index.html") -} -kover { - verify { - rule { - name = "Minimal code coverage" - bound { - minValue = 80 - } - } - } + minimalCoverage.set(80) } tasks.withType().configureEach { diff --git a/state/build.gradle.kts b/state/build.gradle.kts index e810909..191efd6 100644 --- a/state/build.gradle.kts +++ b/state/build.gradle.kts @@ -41,17 +41,8 @@ metadata { name.set("Pedestal State") description.set("Progress-aware failure states") homeUrl.set("https://opensavvy.gitlab.io/pedestal/documentation/state/index.html") -} -kover { - verify { - rule { - name = "Minimal code coverage" - bound { - minValue = 90 - } - } - } + minimalCoverage.set(90) } tasks.withType().configureEach { -- 2.51.2 From 38bd1e6c536f52a0240c12bdf369b21030f71d96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Thu, 27 Jul 2023 22:54:31 +0200 Subject: [PATCH 5/8] ci(gitlab): Publish to MavenCentral --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1c3fbfd..6af979d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,6 +45,19 @@ publish: - if: $CI_COMMIT_TAG interruptible: false +publish-ossrh: + extends: [ .jvm ] + stage: publish + script: + - export SIGNING_KEY_RING=$(mktemp) + - <$SIGNING_KEY_RING_B64 base64 -d >$SIGNING_KEY_RING + - > + ./gradlew + publishAllPublicationsToSonatypeRepository + rules: + - if: $CI_COMMIT_TAG + interruptible: false + publish:ios: extends: [ .ios ] stage: publish @@ -58,6 +71,19 @@ publish:ios: - if: $CI_COMMIT_TAG interruptible: false +publish-ossrh:ios: + extends: [ .ios ] + stage: publish + script: + - > + ./gradlew + publishIosArm64PublicationToSonatypeRepository + publishIosSimulatorArm64PublicationToSonatypeRepository + publishIosX64PublicationToSonatypeRepository + rules: + - if: $CI_COMMIT_TAG + interruptible: false + .test-jvm: extends: [ .jvm ] variables: -- 2.51.2 From bd7652458475f888823c3d079726c4fe856e7bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Thu, 27 Jul 2023 23:53:46 +0200 Subject: [PATCH 6/8] build: Simplify dependency declarations --- spine-ktor/spine-ktor-server/build.gradle.kts | 6 +++--- state-arrow/build.gradle.kts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spine-ktor/spine-ktor-server/build.gradle.kts b/spine-ktor/spine-ktor-server/build.gradle.kts index fb27c31..8e98000 100644 --- a/spine-ktor/spine-ktor-server/build.gradle.kts +++ b/spine-ktor/spine-ktor-server/build.gradle.kts @@ -30,9 +30,9 @@ kotlin { implementation(Ktor.client.logging) implementation(Ktor.server.testHost) - implementation("io.ktor:ktor-server-content-negotiation:_") - implementation("io.ktor:ktor-client-content-negotiation:_") - implementation("io.ktor:ktor-serialization-kotlinx-json:_") + implementation(Ktor.server.contentNegotiation) + implementation(Ktor.client.contentNegotiation) + implementation(Ktor.plugins.serialization.kotlinx.json) } } } diff --git a/state-arrow/build.gradle.kts b/state-arrow/build.gradle.kts index 50a7384..ff7b786 100644 --- a/state-arrow/build.gradle.kts +++ b/state-arrow/build.gradle.kts @@ -20,7 +20,7 @@ kotlin { val commonMain by getting { dependencies { api(projects.state) - api("io.arrow-kt:arrow-core:_") + api(Arrow.core) implementation(projects.logger) } -- 2.51.2 From 1c033b55fb2b1b8590a6fd6ecb3075f6e4ab577f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Fri, 28 Jul 2023 11:13:20 +0200 Subject: [PATCH 7/8] docs: Mention MavenCentral in the README --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5929ca6..f9c2741 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,11 @@ OpenSavvy Pedestal is used by these projects: You can easily add any module using Gradle: ```kotlin -// First, add the OpenSavvy repository repositories { + // Pedestal is available on Maven Central + mavenCentral() + + // Or, if you prefer, Pedestal is also available in our own maven repository maven { name = "OpenSavvy Pedestal" url = uri("https://gitlab.com/api/v4/projects/37325377/packages/maven") @@ -48,7 +51,8 @@ This project has very little platform-specific code, and would be easy to port t If you are interested in another platform, we encourage contributions that add the relevant CI configuration to test and deploy for that platform. - [Release list](https://gitlab.com/opensavvy/pedestal/-/releases) -- [Artifact list](https://gitlab.com/opensavvy/pedestal/-/packages) +- [Artifact list for MavenCentral](https://search.maven.org/search?q=g:dev.opensavvy.pedestal) +- [Artifact list for the GitLab Repository](https://gitlab.com/opensavvy/pedestal/-/packages) - [Breaking changes migration guide](docs/MIGRATION_GUIDE.md) ## Contribution -- 2.51.2 From 4b31d831d70b2473fb3e43d190865b2e9b86266b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Fri, 28 Jul 2023 11:36:27 +0200 Subject: [PATCH 8/8] docs: Add MavenCentral badges to each module's documentation --- backbone/README.md | 2 ++ cache-blocking/README.md | 2 ++ cache/README.md | 2 ++ logger/README.md | 2 ++ progress-coroutines/README.md | 2 ++ progress/README.md | 2 ++ state-arrow/README.md | 2 ++ state-coroutines/README.md | 2 ++ state/README.md | 2 ++ 9 files changed, 18 insertions(+) diff --git a/backbone/README.md b/backbone/README.md index 6611820..ec1597e 100644 --- a/backbone/README.md +++ b/backbone/README.md @@ -2,6 +2,8 @@ Lightweight pattern to integrate reactive caching in all layers of a multiplatform application. + + ## The problem The core of modern applications is often sending data between machines. diff --git a/cache-blocking/README.md b/cache-blocking/README.md index 08d3d5e..25e7219 100644 --- a/cache-blocking/README.md +++ b/cache-blocking/README.md @@ -2,6 +2,8 @@ Blocking wrappers for Pedestal Cache, for contexts in which coroutines are not available in. + + # Package opensavvy.cache.blocking Blocking wrappers instantiated with the [`blocking`][opensavvy.cache.blocking.blocking] helper. diff --git a/cache/README.md b/cache/README.md index 3199242..3518ae4 100644 --- a/cache/README.md +++ b/cache/README.md @@ -2,6 +2,8 @@ Pedestal Cache is a collection of in-process cache algorithms. + + Caching is a powerful technique which allows to dramatically reduce I/O requests, making applications faster and more responsive. For more information on our recommendations for cache-aware software architecture, see the Backbone module. diff --git a/logger/README.md b/logger/README.md index bc7c3aa..9b2cbb4 100644 --- a/logger/README.md +++ b/logger/README.md @@ -5,6 +5,8 @@ Simple multiplatform [Logger][opensavvy.logger.Logger] interface that delegates - JVM: Slf4J - JS: `console` API + + Example usage: ```kotlin diff --git a/progress-coroutines/README.md b/progress-coroutines/README.md index cf25ff9..f454697 100644 --- a/progress-coroutines/README.md +++ b/progress-coroutines/README.md @@ -2,6 +2,8 @@ Compatibility layer for `progress` and KotlinX.coroutines. + + Using the utility functions declared in this project, it is possible to report progress events from any coroutine without changing its signature. Simply call the [report][opensavvy.progress.coroutines.report] function: diff --git a/progress/README.md b/progress/README.md index f78fbd7..ce24ab3 100644 --- a/progress/README.md +++ b/progress/README.md @@ -2,6 +2,8 @@ Micro-library to represent the state of an unfinished task. + + It is often recommended to communicate the progress of any task that doesn't finish instantly to the user. However, this is often forgotten and implemented as a last-minute addition. Pedestal Progress brings a lightweight and easy to use solution. diff --git a/state-arrow/README.md b/state-arrow/README.md index e02e15b..031bda8 100644 --- a/state-arrow/README.md +++ b/state-arrow/README.md @@ -2,6 +2,8 @@ Compatibility layer for `state` and [Arrow Core](https://arrow-kt.io/docs/core/). + + The `state` project is an error management framework for immutable data with progress management using `progress`. Arrow Core is particularly great at representing business failures, and `state` was created to be completely compatible. We encourage any project that has the option to use Arrow Core alongside `state`, using this compatibility module. diff --git a/state-coroutines/README.md b/state-coroutines/README.md index 27ffb0f..c11a11d 100644 --- a/state-coroutines/README.md +++ b/state-coroutines/README.md @@ -1,3 +1,5 @@ # Module state-coroutines Compatibility layer for `state` and KotlinX.Coroutines. + + diff --git a/state/README.md b/state/README.md index 0634167..be87b7a 100644 --- a/state/README.md +++ b/state/README.md @@ -2,6 +2,8 @@ Small library for value-based outcome representation. + + Using `state`, it is possible to model a successful operation, a failed operation, as well as the intermediate progress states of an ongoing operation (using `progress`).