Skip to content

Gradle Forge library

Adam Wyłuda edited this page Jul 8, 2013 · 1 revision

In order to make Gradle work using Forge there is a need to persist some changes (like closures for managed dependencies) into project's build script. To simplify this, Gradle addon will create a library called "forge.gradle" in parent project and add line apply from: 'forge.gradle' at the beggining of build.gradle.

This library does three things:

  • applies profiles to projects (specified with -Pprofile=name command line option)
  • creates properties (closures) for managed dependencies
  • adds task called forgeOutput which is essential to obtain data about build script (this is optional, but if we have this library it's convenient to add it there)

Source code of forge.gradle is available there: https://gist.github.com/adamwy/5951773

Clone this wiki locally