I'm interested in the idea of using Gradle and Ivy to build C# projects.
MSBuild pretty much assumes your dependencies are stable and/or all
source code is in one solution file and provides almost nothing like
Maven or Ivy for publishing and resolving dependencies.
I personally prefer Maven over Ant for java projects, Maven is really
designed around a single artifact per module. MSBuild however does not
like when dlls are renamed to include the version number and each
project usually produces several output files:
xyz.dll - binary
xyz.pdb - debug information
xyz.xml - documentation
en-US/xyz.resources.dll - resource file.
Ivy's flexibility for multiple artifacts and configurations I think
makes it a little easier to use for .net projects and I had some success
with creating some basic ivy.xml files and gant scripts but for the same
reason I prefer Maven over Ant I prefer Gradle over Gant.
I actually use gradle now for some of my C# projects but without any
plugins, however I can't figure out for the life of me how to perform
the equivalent Gant script in Gradle.
The basic gant script looks a bit like this:
includeTool << gant.tools.Ivy
target( name : 'resolve' ) {
ivy.resolve()
}
target( name : 'retrieve' ) {
depends ( resolve )
// This pattern strips version number
// and places resources in correct folder
ivy.retrieve( pattern : "lib/([culture]/)[artifact].[ext]" )
}
// compile, etc
target ( name : 'publish' ) {
depends ( resolve )
ivy.publish ( resolver : "ivysvn", forcedeliver : "true") {
artifacts ( pattern : "bin/([culture]/)[artifact].[ext]" )
}
}
And the ivy.xml may look like this:
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="com.dts-global"
module="Castle-Components-Validator" />
<publications>
<artifact name="Castle.Components.Validator" type="dll" />
<artifact name="Castle.Components.Validator" type="pdb" />
<artifact name="Castle.Components.Validator" type="xml" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="es" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="fr" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="it" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="lt" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="lv" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="mk" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="nl" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="pl" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="pt" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="ru" />
<artifact name="Castle.Components.Validator.resources" type="dll"
e:culture="sv" />
</publications>
<dependencies>
<dependency org="com.dts-global" name="log4net" rev="1.2.10.0"/>
</dependencies>
</ivy-module>
I can't figure out how to express this in Gradle nor can I figure out
how to express this in Gradle.
I don't mind having the ivy.xml files in addition to the gradle build
and calling the ivy tasks using ant builder, but I'm having trouble
figuring out how to even do that but I'm pretty sure this should be
possible even if not very Gradle like but better than going back to Gant
I would think.
Any suggestions?
Thanks,
Kurt
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email