How to generate "plugin-name-classpath.properties" for plugin? For example gradle-maven-classpath.properties


(Yong Cheng) #1

Hi there,

Just found out inside any gradle plugin jar , there is *-classpath.properties file, what is this file used for , and how to generate it?

Inside gradle-maven-classpath.properties, the content is:

#module definition
#Tue Sep 24 09:37:21 CEST 2013
projects=gradle-core,gradle-core-impl,gradle-plugins,gradle-publish
runtime=groovy-all-1.8.6.jar,slf4j-api-1.7.2.jar,maven-ant-tasks-2.1.3.jar,pmaven-common-0.8-20100325.jar,pmaven-groovy-0.8-20100325.jar,plexus-component-annotations-1.5.2.jar

Thanks in advance Yong


(Peter Niederwieser) #2

It’s part of Gradle’s internal class loading mechanism. Third-party plugin don’t need such a file.


(Yong Cheng) #3

I got one reason to curious about this. I wrote one plugin that have over dozen of dependencies, but I don’t want to re-config those same dependencies in my project( the consumer of the plugin), any way you could advice to eliminate these extra dependencies injection?


(Peter Niederwieser) #4

If you publish the plugin to a Maven or Ivy repository, transitive dependency resolution will take care of the rest.