Set versionCode to current date
<p>I have some simple android application for internal use of the company. I would like to create a simple version tracking.
So to implement it I added some code to my build.gradle file:</p>

<pre><code>apply plugin: 'com.android.application'
   buildscript {
      repositories {
         jcenter()
         maven {
           url "https://plugins.gradle.org/m2/"
         }
    }
    dependencies {
       classpath "com.github.ben-manes:gradle-versions-plugin:0.12.0"
       classpath 'org.moallemi.gradle.advanced-build-version:gradle-pugin:1.5.3'
   }
apply plugin: 'org.moallemi.advanced-build-version'
apply plugin: "com.github.ben-manes.versions"

advancedVersioning {
   outputOptions {
      renameOutput true
      nameFormat '${projectName}-${versionCode}'
   }
}
</code></pre>

<p>All I want to do is to set <strong>versionCode</strong> to current date (long).
How can I do it? And Is it a correct direction?</p>

<p>Thanks in advance!</p>