Skip to content

Disable stubsJar publication by default.#1464

Merged
marcingrzejszczak merged 1 commit intospring-cloud:masterfrom
shanman190:master
Aug 7, 2020
Merged

Disable stubsJar publication by default.#1464
marcingrzejszczak merged 1 commit intospring-cloud:masterfrom
shanman190:master

Conversation

@shanman190
Copy link
Copy Markdown
Contributor

Fixes gh-1168.

@shanman190
Copy link
Copy Markdown
Contributor Author

A note is that there was an issue with the ScenarioProjectKotlinSpec with it not publishing any libraries because of the tasks being invoked. check uses the classes output and there was no publications for the publishToMavenLocal to react to.

@shanman190
Copy link
Copy Markdown
Contributor Author

Since I wasn't fully sure if the request was to simply flip and deprecate or fully remove the functionality, I've got both prepared.

https://github.com/shanman190/spring-cloud-contract/commit/60e48cd75739eb854cfc8affecb33444cfdba5bf

/**
* Is set to true will not provide the default publication task
*
* @deprecated - with 2020.0.0, the user should include stubs with their own publication(s)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's write with 3.0.0 cause it's the version of sc contract that matters here

you will need to configure the publishing section for Gradle to
include the `verifierStubsJar`. To do that, you can use the
example configuration below:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add a note here that since 3.0.0 the default has changed.

@Deprecated
private void setPublications(def publishingExtension, TaskProvider<Task> stubsTask) {
publishingExtension.publications {
stubs(MavenPublication) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's worth logging a warning message here that you're using a deprecated feature scheduled for removal and please create the publication task manually?

@shanman190
Copy link
Copy Markdown
Contributor Author

@marcingrzejszczak, just checking in to let you know that I've made the requested changes.

@marcingrzejszczak marcingrzejszczak merged commit ba22c68 into spring-cloud:master Aug 7, 2020
@marcingrzejszczak
Copy link
Copy Markdown
Contributor

As usual great work @shanman190 , thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable/Remove stubsJar implicit publication

3 participants