# SNAPSHOT for zip files

**URL:** <https://discuss.gradle.org/t/snapshot-for-zip-files/4816>\
**Category:** Old Forum Archive\
**Created:** [September 12, 2013, 7:30pm UTC](https://discuss.gradle.org/t/snapshot-for-zip-files/4816 "2013-09-12T19:30:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meera\_Viswanathan](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@Meera\_Viswanathan](https://discuss.gradle.org/u/Meera_Viswanathan)\
**Post date:** [September 12, 2013, 7:30pm UTC](https://discuss.gradle.org/t/snapshot-for-zip-files/4816/1 "2013-09-12T19:30:00Z")

</div>

I have a gradle script to:

1. Build a project 2) Create a zip 3) Upload it to a Maven repository

I want to add a timestamp to the version number. After some digging around, I found that appending x.x-SNAPSHOT accomplished that for me.

The problem I’m facing at the moment is that the SNAPSHOT timestamp value is not appended to the zip file created.

---

<div class="post-metadata">

**Author:** ![Peter\_Niederwieser](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Peter\_Niederwieser](https://discuss.gradle.org/u/Peter_Niederwieser)\
**Post date:** [September 12, 2013, 8:14pm UTC](https://discuss.gradle.org/t/snapshot-for-zip-files/4816/2 "2013-09-12T20:14:00Z")

</div>

In order to help, we would need more information, ideally a self-contained build script that demonstrates the issue.

---

<div class="post-metadata">

**Author:** ![Meera\_Viswanathan](https://avatars.discourse-cdn.com/v4/letter/m/e36b37/32.png) [@Meera\_Viswanathan](https://discuss.gradle.org/u/Meera_Viswanathan)\
**Post date:** [September 12, 2013, 11:35pm UTC](https://discuss.gradle.org/t/snapshot-for-zip-files/4816/3 "2013-09-12T23:35:00Z")

</div>

buildscript {

repositories {

mavenCentral()

}

dependencies {

classpath “com.ullink.gradle:gradle-msbuild-plugin:1.6”

} }

apply plugin:‘msbuild’ apply plugin: ‘maven’

project.ext {

repoUrl = “[http://url/repositories](http://url/repositories)”

someTextRepoUrl = project.repoUrl + “/sometext”

groupID = “somegroup”

artifactID = “artifactid”

versionNo = ‘1.0-SNAPSHOT’ }

repositories {

maven {

url project.snapshotsRepoUrl

} }

msbuild {

// mandatory

projectFile = ‘projectFile\projectFile.csproj’

// MsBuild project name (/p:Project=…)

projectName = [project.name](http://project.name)

// Verbosity (/v:detailed, by default uses gradle logging level)

verbosity = ‘detailed’

// targets to execute (/t:Clean;Rebuild, no default)

targets = [‘Clean’, ‘Rebuild’] }

task zipFileZip(type: Zip, dependsOn: msbuild) {

from ‘projectFile\bin\Debug\’

from (‘projectFile\someFolder\’) {

into(‘someFolder’)

} }

task buildAndUploadAll(dependsOn: uploadArchives) {}

artifacts {

archives zipFileZip }

uploadArchives {

repositories {

mavenDeployer {

repository(url: project.someTextRepoUrl) {

authentication(userName: “xxxxxx”, password: “xxxxxxxx”)

}

pom.version = project.versionNo

pom.artifactId = project.artifactID

pom.groupId = project.groupID

}

} }
