« Return to Thread: creating a manifest-file

creating a manifest-file

by Helmut Denk :: Rate this Message:

Reply to Author | View in Thread

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 ? ;-)

have a nice time

 « Return to Thread: creating a manifest-file