Hi Tim,
On Fri, Dec 25, 2009 at 9:32 PM, Tim Taylor <[email protected]> wrote:
>
> On Dec 23, 2009, at 10:00 AM, Hans Dockter wrote:
>
> You could already hook in your own types of buildable dependencies into
> Gradle configurations.
>
>
> Can you elaborate on this a little bit more?
>
> My initial attempt was modeling CPAN dependencies the same as module
> dependencies using the Dependency DSL:
>
> dependencies {
> foo "org.cpan:Error:0.17015:[email protected]"
> foo module(group: "org.cpan", name: "JSON", version: "1.14",
> classifier: "Apache", ext: "tar.gz") { // TODO: upgrade
> transitive = true
> dependency("org.cpan:URI:1.35:[email protected]") { transitive = true }
> // TODO: upgrade
> dependency("org.cpan:libwww-perl:5.808:[email protected]") { transitive =
> true } // TODO: upgrade
> module(group: "org.cpan", name: "HTML-Parser", version: "3.56",
> classifier: "HTML", ext: "tar.gz") {
> transitive = true
> dependency("org.cpan:HTML-Tagset:3.10:[email protected]") {
> transitive = true } // TODO: upgrade
> }
> }
> ...
> }
>
>
> Can buildable dependencies be used in the DSL above?
>
Yes
> That would be ideal for us. I'd like to continue to use the dependency DSL
> to model the CPAN dependencies[1].
>
>
You probably won't use module dependencies for that. In a first approach you
could add a method (e.g called cpan) to your build script. This method would
return a custom dependency type that is buildable. Your DSL would then look
like:
configurations {
someConf cpan(<args>)
}
(Un)fortunately I'm just having a quick look at my emails before I continue
my holidays. I will be back on Saturday and can provide more details then
(on Monday the lastest).
>
> Fröhliche Weihnachten,
>
Frohes neues Jahr :)
- Hans
> Tim
>
>
>
> [1]: Others may wish for CpanProject that understands and pulls the
> dependencies from search.cpan.org, but in our case we desire a CPAN tree
> snapshot at a specific point in time so that we can reproduce our production
> configuration which may rely on out-of-date CPAN modules.
>
>