On Thu, Feb 24, 2011 at 8:20 AM, Jesper Skov <[email protected]>wrote:

> Still, I would dearly like to make it work.
>

I solved the problem by using init scripts.

I had to hack gradle.bat so it always adds the below init script:

-----
import dk.jyskebank.tools.gradle.bootstrap.BuildScriptsBootstrap

initscript {
  dependencies {
    classpath
files("file://${System.getenv('JB_BUILDSCRIPTS_BOOTSTRAP_JAR')}")
  }
}

gradle.beforeProject { Project p ->
    BuildScriptsBootstrap.bootstrap(p)
}
-----

BuildScriptsBootstrap make a local copy of the actual buildscripts plugin
and puts it on the main project's buildscripts classpath.

So customer projects just have to

a) specify buildscripts version to use in gradle.properties:
buildScriptsVersion=V1-0-0
b) in build.gradle include: apply(plugin: 'buildscripts')

The buildScripts version specified can also point to a local installation,
making it very easy for me to work on the buildscripts implementation.

Very nice!

Cheers,
Jesper

Reply via email to