2016년 3월 18일 금요일

Obtaining information about your build

@Listing projects

gradle projects command를 실행시키면 현재 프로젝트의 sub project의 리스트를 볼 수 있다.


- gradle -q projects 의 결과
> gradle -q projects

------------------------------------------------------------
Root project
------------------------------------------------------------

Root project 'projectReports'
+--- Project ':api' - The shared API for the application
\--- Project ':webapp' - The Web application implementation

To see a list of the tasks of a project, run gradle :tasks
For example, try running gradle :api:tasks

각 project의 description을 명시하기 위해, 아래와 같이 사용할 수 있다.

- build.gradle

description = 'The shared API for the application'

@Listing tasks

gradle tasks 를 실행시키면 현재 선택된 project의 main task들을 볼 수 있다.

- gradle -q tasks 의 실행 결과

> gradle -q tasks

------------------------------------------------------------
All tasks runnable from root project
------------------------------------------------------------

Default tasks: dists

Build tasks
-----------
clean - Deletes the build directory (build)
dists - Builds the distribution
libs - Builds the JAR

Build Setup tasks
-----------------
init - Initializes a new Gradle build. [incubating]
wrapper - Generates Gradle wrapper files. [incubating]

Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in root project 'projectReports'.
components - Displays the components produced by root project 'projectReports'. [incubating]
dependencies - Displays all dependencies declared in root project 'projectReports'.
dependencyInsight - Displays the insight into a specific dependency in root project 'projectReports'.
help - Displays a help message.
model - Displays the configuration model of root project 'projectReports'. [incubating]
projects - Displays the sub-projects of root project 'projectReports'.
properties - Displays the properties of root project 'projectReports'.
tasks - Displays the tasks runnable from root project 'projectReports' (some of the displayed tasks may belong to subprojects).

To see all tasks and more detail, run gradle tasks --all

To see more detail about a task, run gradle help --task 

위와 같이 report에 description을 포함시키기 위해, 아래와 같이 추가할 수 있다.

dists {
    description = 'Builds the distribution'
    group = 'build'
}


원본 출처 : https://docs.gradle.org/current/userguide/tutorial_gradle_command_line.html

댓글 없음 :

댓글 쓰기