Create text file into a zip/tar

Hopefully this is a trivial problem that exposes my gradle/groovy inexperience.

As part of distributing my application, I want to generate a text file with a version / timestamp into the tar. Is there an easy way to do this as part of the distributions plugin?

apply plugin: 'distribution'
distributions{
main{
	contents{
		includeEmptyDirs false

		into('/'){
			from file('stuff/build/after_inst_script')

			//want to create a 'version.txt' with the date, etc here
		}
	}
}