codeartifact-gradle-plugin icon indicating copy to clipboard operation
codeartifact-gradle-plugin copied to clipboard

Builds fail with error "Could not find method getSharedServices()"

Open brightshine1111 opened this issue 3 years ago • 1 comments

I added this plugin to a project exactly as described in the instructions and now any Gradle task, including clean fails with the following error:

> Configure project :
Evaluating root project '[project]' using build file '/Users/benfa/repos/[project]/build.gradle'.

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/benfa/repos/[project]/build.gradle' line: 5

* What went wrong:
An exception occurred applying plugin request [id: 'ai.clarity.codeartifact', version: '0.0.12']
> Failed to apply plugin [id 'ai.clarity.codeartifact']
   > Could not find method getSharedServices() for arguments [] on build '[project]' of type org.gradle.invocation.DefaultGradle.

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

I'm using the latest version of this plugin (0.0.12) and Gradle 5.3. Is there a minimum Gradle version this plugin can be used with?

brightshine1111 avatar Jun 16 '21 22:06 brightshine1111

We have not tested the plugin with versions lower than 6.x

The failing method was introduced in the API in version 6:

https://docs.gradle.org/current/javadoc/org/gradle/api/invocation/Gradle.html#getSharedServices--

Then, the minimum Gradle version seems to be 6.1

jerolba avatar Jun 19 '21 11:06 jerolba