Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Upgrade plugins, trying to fix publication failing #222

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: gradle/actions/setup-gradle@v3

- name: publish release
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
run: ./gradlew publishToSonatype closeAndReleaseStagingRepositories
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
Expand Down
11 changes: 8 additions & 3 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import kotlinx.benchmark.gradle.JvmBenchmarkTarget

plugins {
java
kotlin("jvm") version libs.versions.kotlin
id("org.jetbrains.kotlinx.benchmark") version "0.4.10"
id("org.jetbrains.kotlinx.benchmark") version "0.4.11"
kotlin("plugin.allopen") version libs.versions.kotlin
kotlin("plugin.serialization") version libs.versions.kotlin
}
Expand All @@ -17,13 +19,16 @@ benchmark {
}
}
targets {
register("main")
register("main") {
this as JvmBenchmarkTarget
jmhVersion = "1.37"
}
}
}

dependencies {
implementation("org.apache.commons:commons-lang3:3.14.0")
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.10")
implementation("org.jetbrains.kotlinx:kotlinx-benchmark-runtime:0.4.11")

val jacksonVersion = "2.17.0"
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion")
Expand Down
43 changes: 19 additions & 24 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,30 +69,9 @@ tasks.named<Jar>("javadocJar") {
from(tasks.named("dokkaJavadoc"))
}

// Configuration for publication on maven central
val signingKey: String? by project
val signingPassword: String? by project

val publications: PublicationContainer = (extensions.getByName("publishing") as PublishingExtension).publications

signing {
useGpgCmd()
if (signingKey != null && signingPassword != null) {
useInMemoryPgpKeys(signingKey, signingPassword)
}
if (Ci.isRelease) {
sign(publications)
}
}

nexusPublishing {
this.repositories {
sonatype()
}
}
publishing {
publications {
register("mavenJava", MavenPublication::class) {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
val projectUrl = "https://github.com/avro-kotlin/avro4k"
Expand Down Expand Up @@ -130,9 +109,25 @@ publishing {
}
}

fun Project.publishing(action: PublishingExtension.() -> Unit) = configure(action)
nexusPublishing {
repositories {
sonatype()
}
}

fun Project.signing(configure: SigningExtension.() -> Unit): Unit = configure(configure)
signing {
if (Ci.isRelease) {
val signingKey: String? by project
val signingPassword: String? by project

if (signingKey != null && signingPassword != null) {
useInMemoryPgpKeys(signingKey, signingPassword)
} else {
throw IllegalStateException("No signing key or password found")
}
sign(publishing.publications)
}
}

object Ci {
// this is the version used for building snapshots
Expand Down
10 changes: 5 additions & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ dependencyResolutionManagement {
library("kotlinx-serialization-core", "org.jetbrains.kotlinx", "kotlinx-serialization-core").version(kotlinxSerialization)
library("kotlinx-serialization-json", "org.jetbrains.kotlinx", "kotlinx-serialization-json").version(kotlinxSerialization)

val kotestVersion = "5.8.0"
val kotestVersion = "5.9.1"
library("kotest-core", "io.kotest", "kotest-assertions-core").version(kotestVersion)
library("kotest-json", "io.kotest", "kotest-assertions-json").version(kotestVersion)
library("kotest-junit5", "io.kotest", "kotest-runner-junit5").version(kotestVersion)
library("kotest-property", "io.kotest", "kotest-property").version(kotestVersion)

plugin("dokka", "org.jetbrains.dokka").version("1.9.10")
plugin("dokka", "org.jetbrains.dokka").version("1.9.20")
plugin("kotest", "io.kotest").version("0.4.11")
plugin("github-versions", "com.github.ben-manes.versions").version("0.46.0")
plugin("nexus-publish", "io.github.gradle-nexus.publish-plugin").version("1.3.0")
plugin("github-versions", "com.github.ben-manes.versions").version("0.51.0")
plugin("nexus-publish", "io.github.gradle-nexus.publish-plugin").version("2.0.0")
plugin("spotless", "com.diffplug.spotless").version("6.25.0")
plugin("kover", "org.jetbrains.kotlinx.kover").version("0.7.6")
plugin("kover", "org.jetbrains.kotlinx.kover").version("0.8.1")
plugin("binary-compatibility-validator", "org.jetbrains.kotlinx.binary-compatibility-validator").version("0.14.0")
}
}
Expand Down