Skip to content

fix: Dependency Clash with annotations-api #16

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

Merged
merged 6 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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/deploy-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
ORG_GPG_PRIVATE_KEY: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
ORG_OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
ORG_OSSRH_USERNAME: ${{ secrets.ORG_OSSRH_USERNAME }}
run: ./gradlew publishAllPublicationsToOSSRHReleaseRepository
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-configuration-cache
2 changes: 1 addition & 1 deletion .github/workflows/deploy-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
ORG_GPG_PRIVATE_KEY: ${{ secrets.ORG_GPG_PRIVATE_KEY }}
ORG_OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
ORG_OSSRH_USERNAME: ${{ secrets.ORG_OSSRH_USERNAME }}
run: ./gradlew publishAllPublicationsToOSSRHSnapshotRepository
run: ./gradlew publishToSonatype --no-configuration-cache
18 changes: 17 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2023 - 2025 Contributors to the Eclipse Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,6 +39,16 @@ plugins {
version
kotlin("jvm")
jacoco
alias(libs.plugins.gradle.nexus.publish.plugin)
}

nexusPublishing {
repositories {
sonatype {
username = System.getenv("ORG_OSSRH_USERNAME")
password = System.getenv("ORG_OSSRH_PASSWORD")
}
}
}

subprojects {
Expand All @@ -60,6 +70,12 @@ subprojects {
}
systemProperties = systemPropertiesMap
}

// https://docs.gradle.org/current/userguide/dependency_locking.html
dependencyLocking {
lockAllConfigurations()
lockFile = file("$projectDir/gradle.lockfile")
}
}

@OptIn(ExperimentalPathApi::class)
Expand Down
28 changes: 7 additions & 21 deletions buildSrc/src/main/kotlin/publish.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2023 - 2025 Contributors to the Eclipse Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,6 +23,9 @@ plugins {
}

interface PublishPluginExtension {
val artifactGroup: Property<String>
val artifactName: Property<String>
val artifactVersion: Property<String>
val mavenPublicationName: Property<String>
val componentName: Property<String>
val description: Property<String>
Expand All @@ -32,29 +35,12 @@ val extension = project.extensions.create<PublishPluginExtension>("publish")

afterEvaluate {
publishing {
repositories {
maven {
name = "OSSRHRelease"

url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("ORG_OSSRH_USERNAME")
password = System.getenv("ORG_OSSRH_PASSWORD")
}
}
maven {
name = "OSSRHSnapshot"

url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
credentials {
username = System.getenv("ORG_OSSRH_USERNAME")
password = System.getenv("ORG_OSSRH_PASSWORD")
}
}
}
publications {
register<MavenPublication>(extension.mavenPublicationName.get()) {
from(components[extension.componentName.get()])
groupId = extension.artifactGroup.getOrElse(project.group.toString())
artifactId = extension.artifactName.getOrElse(project.name)
version = extension.artifactVersion.getOrElse(project.version.toString())

pom {
name = "${project.group}:${project.name}"
Expand Down
6 changes: 2 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
androidGradlePlugin = "8.3.2" # Check with detekt table first: https://detekt.dev/docs/introduction/compatibility/
detekt = "1.23.6"
dockerJavaCore = "3.4.1"
dokka = "1.9.10"
dokka = "1.9.20"
kotlin = "1.9.22"
tomcatAnnotations = "6.0.53"
ktlint = "0.0" # Maintained inside ktlint.gradle.kts
grpc = "1.65.1"
grpcKotlin = "1.4.1"
Expand All @@ -25,7 +24,6 @@ grpc-kotlin-stub = { group = "io.grpc", name = "grpc-kotlin-stub", version.ref =
protoc-gen-grpc-kotlin = { group = "io.grpc", name = "protoc-gen-grpc-kotlin", version.ref = "grpcKotlin" }
protobuf-kotlin-lite = { group = "com.google.protobuf", name = "protobuf-kotlin-lite", version.ref = "protobuf" }

tomcat-annotations = { group = "org.apache.tomcat", name = "annotations-api", version.ref = "tomcatAnnotations" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }

Expand All @@ -44,4 +42,4 @@ grpc-protoc-java-gen = { group = "io.grpc", name = "protoc-gen-grpc-java", versi

[plugins]
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
pluginPublishing = { id = "com.gradle.plugin-publish", version = "1.2.1" }
gradle-nexus-publish-plugin = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
15 changes: 6 additions & 9 deletions kuksa-java-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,19 @@ java {
}

dependencies {
api(project(":vss-core")) // Models are exposed

testImplementation(project(":test-core"))

// needs to be api as long as we expose ProtoBuf specific objects
api(libs.grpc.protobuf)
api(libs.protobuf.kotlin.lite)

implementation(kotlin("reflect"))

api(project(":vss-core")) // models are exposed
api(libs.grpc.protobuf) // needs to be api as long as we expose ProtoBuf specific objects

implementation(libs.protobuf.kotlin.lite)
implementation(libs.grpc.okhttp)
implementation(libs.grpc.stub)
implementation(libs.grpc.kotlin.stub)
implementation(libs.tomcat.annotations)
implementation(libs.kotlinx.coroutines.core)

testImplementation(project(":test-core"))

testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.kotest)
testImplementation(libs.mockk)
Expand Down
Loading
Loading