Reputation: 12646
I downloaded the gradle plugin test project from their github here: https://github.com/gradle/gradle/tree/master/subprojects/docs/src/samples/customPlugin
I also updated gradle to latest (4.7
).
When I gradle build
the consumer
project, I get the following build error:
FAILURE: Build failed with an exception.
Could not resolve all artifacts for configuration ':classpath'. Could not find org.gradle:customPlugin:1.0-SNAPSHOT. Searched in the following locations: file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/maven- metadata.xml file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom Plugin-1.0-SNAPSHOT.pom file:/C:/Code/gradle/subprojects/docs/src/samples/customPlugin/repo/org/gradle/customPlugin/1.0-SNAPSHOT/custom Plugin-1.0-SNAPSHOT.jar Required by: project :
What's the issue here? I guess I don't understand gradle plugins enough. Does the plugin need to be built somehow? I have no 1.0-SNAPSHOT
pat or anything of the sort, which seems to be where its looking.
Upvotes: 0
Views: 168
Reputation: 16833
Does the plugin need to be built somehow ?
Yes, at first, otherwise the consumer
project won't find it.
Inside the plugin
project, just run gradle uploadArchive
And then retry a gradle build
inside the consumer
project
Upvotes: 1