Skip to content

Commit

Permalink
Fix maven publish issues (#273)
Browse files Browse the repository at this point in the history
[build] Publish from(components["java"])

[build] Fix maven publishing
- avoid publishing of test-fixtures jars;
- avoid dependencies with no version set.

[build] Remove unnecessary explicit dependency of jacodb-api-jvm on Libs.kotlinx_collections_immutable
  • Loading branch information
Saloed authored Oct 22, 2024
1 parent 286ab98 commit e86abeb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ if (!repoUrl.isNullOrEmpty()) {
publications {
register<MavenPublication>("jar") {
from(components["java"])
setOf("apiElements", "runtimeElements")
.flatMap { configName -> configurations[configName].hierarchy }
.forEach { configuration ->
configuration.dependencies.removeIf { dependency ->
dependency.version.isNullOrBlank()
}
}
artifact(tasks.named("sourcesJar"))
artifact(tasks.named("dokkaJavadocJar"))

Expand Down
1 change: 0 additions & 1 deletion jacodb-api-jvm/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies {
api(Libs.asm_commons)
api(Libs.asm_util)

api(Libs.kotlinx_collections_immutable)
api(Libs.kotlinx_coroutines_core)
api(Libs.kotlinx_coroutines_jdk8)

Expand Down

0 comments on commit e86abeb

Please sign in to comment.