Skip to content

Commit

Permalink
build: verify that publication artifact version is set
Browse files Browse the repository at this point in the history
Signed-off-by: Artyom Shendrik <[email protected]>
  • Loading branch information
amal committed Dec 24, 2023
1 parent 11ac58c commit 4355291
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

### Added
- highlight publication setup in logs.
- verify that publication artifact version is set.

### Changed
- remove tests & checks from the `release` CI workflow.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,16 @@ private fun Project.applyMavenPublishPlugin(config: FluxoPublicationConfig): Pub
throw GradleException("Publication artifact group is not set!")
}

val v = config.version
if (v.contains("unspecified", ignoreCase = true)) {
throw GradleException("Publication artifact version is not set!")
}

group = config.group
version = config.version
version = v
description = config.projectDescription

logger.lifecycle(formatSummary("Publication setup: v${config.version}"))
logger.lifecycle(formatSummary("Publication setup: v$v"))

pluginManager.apply("maven-publish")
return extensions.getByName<PublishingExtension>(PUBLISHING_EXT_NAME)
Expand Down

0 comments on commit 4355291

Please sign in to comment.