What is Gradle's equivalent of POM distribution?


(sirinath1978m) #1

What is Gradle’s equivalent of POM distribution?


(Szczepan Faber) #2

Such concept is not really needed in Gradle. The main feature of POM distribution is reusing / centralizing project configuration. Gradle has many different capabilities for that purpose. For example, you can:

  1. Use plugin 2. Import parts of the gradle script from a file (apply from: ‘common.gradle’), it’s really a variation of #1 3. Use configuration injection (more about that topic in the user guide)

Hope that helps!


(sirinath1978m) #3

Can you give an example


(Szczepan Faber) #4

Sure:

  1. Global configuration / configuration injection: http://gradle.org/current/docs/userguide/userguide_single.html#multiProject 1. Configuring from external gradle script: http://gradle.org/current/docs/userguide/userguide_single.html#sec:configuring_using_external_script