문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
gradle:ant [2012/10/09 14:55] kwon37xi |
gradle:ant [2014/06/27 15:05] (현재) kwon37xi |
||
|---|---|---|---|
| 줄 5: | 줄 5: | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| - | * [[http:// | + | * [[http:// |
| + | * AntBuilder의 자세한 사항은 [[: | ||
| ===== Ant 태스크와 타입 ===== | ===== Ant 태스크와 타입 ===== | ||
| 줄 11: | 줄 12: | ||
| * '' | * '' | ||
| * 앤트 태스크 속성은 Map 형태의 파라미터로 전달한다. | * 앤트 태스크 속성은 Map 형태의 파라미터로 전달한다. | ||
| + | * 각종 Ant 태스크를 AntBuilder 형태로 변환한 것은 [[gant: | ||
| * 메시지 출력< | * 메시지 출력< | ||
| task hello << { | task hello << { | ||
| 줄 130: | 줄 132: | ||
| println ant.references.antPath | println ant.references.antPath | ||
| println ant.references[' | println ant.references[' | ||
| - | < | + | </code> |
| - | ===== JavaExec | + | ===== java task ===== |
| - | Java 클래스를 실행할 때 Ant를 사용하는 방법과 | + | [[https://ant.apache.org/manual/Tasks/java.html|Ant Java 태스크]]는 Java 클래스를 실행한다. [[gradle: |
| - | ==== Ant java 태스크 ==== | ||
| <code groovy> | <code groovy> | ||
| - | + | ant.java(classname: | |
| - | configurations { | + | |
| - | | + | arg(value: ' |
| + | ... | ||
| } | } | ||
| + | </ | ||
| - | dependencies | + | ===== zip task ===== |
| - | | + | * 일반적인 zip 압축< |
| + | task zip << | ||
| + | | ||
| + | fileset(dir: ' | ||
| + | include(name: | ||
| + | exclude(name: | ||
| + | } | ||
| + | } | ||
| } | } | ||
| + | </ | ||
| + | * 파일들을 압축파일의 특정 디렉토리에 넣기 [[https:// | ||
| + | // resources.zip 파일의 resources/ 디렉토리로 압축 | ||
| - | task preProc << { | + | ant.zip(destfile: " |
| - | | + | |
| - | classpath: "${sourceSets.main.preProcCP.asPath}") | + | |
| } | } | ||
| - | |||
| - | compile.dependsOn preproc | ||
| </ | </ | ||
| - | |||