Take a look at the HEAD version of either the idea plugin or the
eclipse plugin.  Both of these are doing the same thing.  It would
actually be very useful to get the same thing for netbeans (though
there hasn't been a lot of clamor from the community for it).  These
two plugins essentially do the same thing as the old mvn idea:idea or
mvn eclipse:eclipse

On Wed, Aug 11, 2010 at 13:07, Ståle Undheim <[email protected]> wrote:
> I have defined a task for updating a netbeans project with it's build
> dependencies extracted from gradle. The issue is that I would like to
> also download source and javadoc jars (if they exist) for dependencies
> when updating the netbeans dependencies and libraries. That way the
> source code will be available in netbeans when using goto source.
>
> I have provided the task below. Also, please enlighten me if I am
> using bad groovy coding patterns here, it's still a pretty fresh
> language to me.
>
> task nbdep(dependsOn: [configurations.compile,configurations.testCompile]) << 
> {
>  nbprops = new java.util.Properties()
>  nbprops.load(new FileInputStream("lib/nblibraries.properties"))
>  [configurations.compile,configurations.testCompile].each { c ->
> c.dependencies.each { d ->
>    
> nbprops.setProperty("libs.${d.name}_${d.version}.classpath","${c.fileCollection(d).collect
> { File f -> f.absolutePath }.join(":")}")
>  }}
>
>  nbprops.store(new FileWriter("lib/nblibraries.properties"),
> "Generated by gradle")
>
>  projectprops = new java.util.Properties()
>  projectprops.load(new FileInputStream("nbproject/project.properties"))
>  cp_compile = { d -> "\${libs.${d.name}_${d.version}.classpath}" }
>  projectprops.setProperty("javac.classpath",
> configurations.compile.dependencies.collect(cp_compile).join(":"))
>  projectprops.setProperty("javac.test.classpath",
> "\${javac.classpath}:\${build.classes.dir}:"+configurations.testCompile.dependencies.collect(cp_compile).join(":"))
>  projectprops.store(new FileWriter("nbproject/project.properties"),
> "Generated by gradle")
> }
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>



-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to