[Gradle] Task Zip

ITWeb/개발일반 2020. 4. 17. 10:13

참고문서)

https://docs.gradle.org/current/userguide/working_with_files.html#sec:creating_archives_examplel

 

예제) build.gradle

plugins {
  id 'base'
}

def buildNumber = System.getenv('BUILD_NUMBER')
version = "0.0.${buildNumber}"

task packageDistribution(type: Zip) {
  archiveFileName = "${project.name}-${project.version}.zip"
  destinationDirectory = file("$buildDir/dist")

  from 'docker-compose', 'scripts'
}

 

: