-
Notifications
You must be signed in to change notification settings - Fork 485
Closed
Description
I have a multi modue project in gradle.
Ideally, I want to apply the changelog plugin only once - to prevent: diffplug/spotless-changelog#24
But if I do this, the maven-publish task fails and only sets a version of undefined
.
However, if I apply changelog to all projects the maven-publish task works nicely, but I can no longer execute the version bump task.
The workaround suggested here: diffplug/spotless-changelog#25 respectively
spotless/gradle/changelog.gradle
Lines 1 to 22 in 58e53b6
String kind | |
if (project.name == 'plugin-gradle') { | |
kind = 'gradle' | |
} else if (project.name == 'plugin-maven') { | |
kind = 'maven' | |
} else if (project.name.startsWith('eclipse')) { | |
kind = 'ext-' + project.name | |
} else { | |
assert project == rootProject | |
kind = 'lib' | |
} | |
// the root project and plugins have their own changelogs | |
apply plugin: 'com.diffplug.spotless-changelog' | |
spotlessChangelog { | |
changelogFile 'CHANGES.md' | |
// need -Prelease=true in order to do a publish | |
appendDashSnapshotUnless_dashPrelease=true | |
tagPrefix "${kind}/" | |
commitMessage "Published ${kind}/{{version}}" // {{version}} will be replaced | |
} |
How can this be achieved?
Metadata
Metadata
Assignees
Labels
No labels