Skip to content

Disable stubsJar publication by default. #1464

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

Merged
merged 1 commit into from
Aug 7, 2020
Merged

Disable stubsJar publication by default. #1464

merged 1 commit into from
Aug 7, 2020

Conversation

shanman190
Copy link
Contributor

Fixes gh-1168.

@shanman190
Copy link
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
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.

shanman190@60e48cd

@@ -233,7 +233,10 @@

/**
* 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
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
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.

@@ -193,6 +194,7 @@ class SpringCloudContractVerifierGradlePlugin implements Plugin<Project> {
}

@CompileDynamic
@Deprecated
private void setPublications(def publishingExtension, TaskProvider<Task> stubsTask) {
publishingExtension.publications {
stubs(MavenPublication) {
Copy link
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
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
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