Helmut Denk wrote:
> hi gradle-users,
>
> with help from the mailinglist and some try & error
> i managed to create the manifest-file i want.
>
> my script looks like this:
>
>
> manifestCp = new StringBuffer()
>
> configurations.runtime.allDependencies.each { dep ->
> manifestCp.append(' ')
> manifestCp.append("lib/${dep.getName()}-${dep.getVersion()}.jar")
> }
> manifestCp.delete(0,1)
>
> manifest.mainAttributes(
> 'Provider': 'com.mycompany',
> 'Main-Class': 'insert_mainclass_here',
> 'Implementation-Version': version,
> 'Built-With': 'gradle', // todo: get gradle-version
> 'Class-Path': manifestCp.toString())
>
>
> but damn ... this could be more elegant ...
> right ? ;-)
>
>
It could. I wonder if this is the start of a 'java-application' plugin
which extends the java plugin, and which packages your project as an
application in various ways:
- an executable jar, like above
- a windows exe using Launch4J or similar
- a unix launch script
- a mac OS X app bundle
- RPMs, web start, etc
> have a nice time
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email