pact-foundation / pact-jvm

JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
https://docs.pact.io
Apache License 2.0
1.07k stars 475 forks source link

Gradle build fail after upgrading to 4.3.12 #1586

Open micjaesc opened 1 year ago

micjaesc commented 1 year ago

Hi, After modernizing library 'au.com.dius.pact' version 4.3.9 to 4.3.12, our service is not building anymore.

The message

> Could not find method hasPactsFromPactBroker() for arguments [our server] on object of type au.com.dius.pact.provider.gradle.GradleProviderInfo.

callstack

Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method hasPactsFromPactBroker() for arguments [our server] on object of type au.com.dius.pact.provider.gradle.GradleProviderInfo.
    at org.gradle.internal.metaobject.AbstractDynamicObject$CustomMissingMethodExecutionFailed.<init>(AbstractDynamicObject.java:190)
    at org.gradle.internal.metaobject.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:

we use gradle version https\://services.gradle.org/distributions/gradle-7.5-all.zip

Any hint, any migration info ? Thank you in advance. Michal

rholshausen commented 1 year ago

Looks like it is an issue with how the Kotlin compiler is generating the method signatures.

I'm going to fix it but changing the methods on the GradleProviderInfo class, but until then you can add any key-value parameter and it will then match the method signature.

I.e.,

     hasPactsFromPactBroker('http://server-url', value: true) // can add any key-value here
micjaesc commented 1 year ago

Great, thank you, I will wait for 4_3_13