Skip to content
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

maven-publish integration in multi-module project #1131

Closed
geoHeil opened this issue Feb 16, 2022 · 1 comment
Closed

maven-publish integration in multi-module project #1131

geoHeil opened this issue Feb 16, 2022 · 1 comment

Comments

@geoHeil
Copy link

geoHeil commented Feb 16, 2022

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

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
}
is not what I want. Rather a single changelog for the overall modules in the project i.e. single application.

How can this be achieved?

@geoHeil
Copy link
Author

geoHeil commented Feb 16, 2022

closing - moved to correct location diffplug/spotless-changelog#36

@geoHeil geoHeil closed this as completed Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant