Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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')
- }
Add Comment
Please, Sign In to add comment