Created
May 11, 2018 02:47
-
-
Save alwarren/3a9ddf974c7d1e411808fbe5870a9159 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.DateFormat | |
import java.text.SimpleDateFormat | |
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
// your other gradle code here | |
static def getDateTime() { | |
DateFormat df = new SimpleDateFormat("YYYYMMddHHmm"); | |
return df.format(new Date()); | |
} | |
task _projectZip(type:Zip) { | |
description = 'Makes a single zip file suitable for import.' | |
from projectDir | |
baseName = "project-files-" + getDateTime() | |
include 'build.gradle' | |
include 'gradle.properties' | |
include 'gradlew' | |
include 'gradlew.bat' | |
include 'settings.gradle' | |
include 'gradle/**' | |
exclude 'build' | |
exclude '.gradle' | |
exclude '*.iml' | |
exclude 'local.properties' | |
include 'app/**' | |
exclude 'app/*.iml' | |
exclude 'app/build' | |
include 'data/**' | |
exclude 'data/*.iml' | |
exclude 'data/build' | |
include 'domain/**' | |
exclude 'domain/*.iml' | |
exclude 'domain/build' | |
include '.idea/**' | |
exclude '.idea/workspace.xml' | |
exclude '.idea/libraries' | |
include 'documents/**' | |
destinationDir file('zip') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment