Skip to content

Commit

Permalink
fix self referencing problem
Browse files Browse the repository at this point in the history
  • Loading branch information
osoykan committed Sep 4, 2024
1 parent f44911b commit 7052541
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle-publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
gradle-version: current

- name: Publish to Maven Repository
run: gradle publish
run: gradle publish --parallel
env:
SNAPSHOT: true
gpg_private_key: ${{ secrets.gpg_private_key }}
Expand Down
17 changes: 16 additions & 1 deletion buildSrc/src/main/kotlin/stove-publishing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,22 @@ publishing {
version = rootProject.version.toString()
println("version to be published: ${rootProject.version}")
artifactId = project.name
from(components["java"])
val javaComponent = components["java"]
from(javaComponent)

javaComponent as AdhocComponentWithVariants

configurations.findByName("testFixturesApiElements")?.let {
javaComponent.withVariantsFromConfiguration(it) {
skip()
}
}
configurations.findByName("testFixturesRuntimeElements")?.let {
javaComponent.withVariantsFromConfiguration(it) {
skip()
}
}

pom {
name.set(project.name)
description.set(project.properties["projectDescription"].toString())
Expand Down

0 comments on commit 7052541

Please sign in to comment.