public void inheritManifest ( @ Nonnull final Jar pTask , @ Nonnull final DependencyConfig pDepConfig ) { pTask . doFirst ( new Closure < Void > ( pTask ) { @ Override @ SuppressWarnings ( "MethodDoesntCallSuperMethod" ) public Void call ( ) { final Jar jarTask = ( Jar ) getTask ( TaskNames . jar , pDepConfig ) ; pTask . setManifest ( jarTask . getManifest ( ) ) ; addBuildTimestamp ( pTask . getManifest ( ) . getAttributes ( ) ) ; return null ; } } ) ; }
Make the given Jar task inherit its manifest from the main thin Jar task . Also set the build timestamp .