[Gradle]그래들 알아보기 3 - Command-Line Interface Basics

2024. 6. 8. 15:31·SW개발/Spring

https://docs.gradle.org/current/userguide/command_line_interface_basics.html

 

Command-Line Interface Basics

The command-line interface is the primary method of interacting with Gradle outside the IDE. Substitute ./gradlew (in macOS / Linux) or gradlew.bat (in Windows) for gradle in the following examples. Executing Gradle on the command line conforms to the foll

docs.gradle.org

 

Command-Line Interface Basics

명령어 라인 인터페이스는 IDE 외부에서 그래들을 이용하는데 기본 방법입니다.

 

 

 

마찬가지로 그래들 래퍼를 사용하는 것이 좋습니다.

명령어 라인에서 그래들을 사용하면 다음과 같은 구조를 따릅니다.

$ ./gradlew [taskName...] [--option-name...]

옵션이 태스크 이름 앞에 위치하는 것도 허용됩니다.

$ ./gradlew [--option-name...] [taskName...]

여러개의 태스크를 지정하고 싶다면 공백과 함께 입력하면 됩니다.

$ ./gradlew [taskName1 taskName2...] [--option-name...]

값을 허용하는 옵션은 옵션과 인수 사이에 =를 포함하거나 포함하지 않고 지정이 가능합니다. (=의 사용을 권장합니다.)

$ ./gradlew [...] --console=plain

많은 long-form 옵션은 동일한 short-option이 존재합니다. 

$ ./gradlew --help
$ ./gradlew -h

 

Command-line usage

다음의 섹션에서는 그래들 명령어 라인 인터페이스를 사용하는 방법입니다. 몇몇 플러그인은 그들만의 명령어가 존재합니다.

 

태스크 실행

루트 프로젝트의 taskName을 이용하여 태스크를 실행시킬 수 있습니다.

$ ./gradlew :taskName

그러면 모든 의존성이 싱글 TaskName에서 실행됩니다.

 

태스크에 옵션을 지정하기

태스크에 옵션을 지정하려면 taskName 뒤에 -- prefix와 함께 옵션을 지정합니다.

$ ./gradlew taskName --exampleOption=exampleValue

 

728x90

'SW개발 > Spring' 카테고리의 다른 글

[Gradle]그래들 알아보기 6 - Dependency Management Basics  (0) 2024.06.11
[Gradle]그래들 알아보기 5 - Build File Basics  (0) 2024.06.10
[Gradle]그래들 알아보기 4 - Settings File Basics  (0) 2024.06.09
[Gradle]그래들 알아보기 2 - Gradle Wrapper Basics  (1) 2024.06.07
[Gradle]그래들 알아보기 1 - Gradle Basics  (0) 2024.06.07
'SW개발/Spring' 카테고리의 다른 글
  • [Gradle]그래들 알아보기 5 - Build File Basics
  • [Gradle]그래들 알아보기 4 - Settings File Basics
  • [Gradle]그래들 알아보기 2 - Gradle Wrapper Basics
  • [Gradle]그래들 알아보기 1 - Gradle Basics
Leffe_pt
Leffe_pt
개발자로서 성장하면서 배워온 지식과 경험을 공유하는 공간입니다.
  • Leffe_pt
    Leffe's tistory
    Leffe_pt
  • 전체
    오늘
    어제
    • 분류 전체보기 (309)
      • SW개발 (305)
        • 코딩테스트 (172)
        • 개발이야기 (23)
        • IT 용어 (17)
        • Python (22)
        • Django (46)
        • Flask (2)
        • Database (3)
        • SQLAlchemy (0)
        • Javascript (5)
        • Linux, Unix (3)
        • JAVA (2)
        • Spring (10)
      • 회고 (4)
      • 사진 (0)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    오픈소스
    Contributor
    배달
    음식
    배공파용
    트리 #AVL #알고리즘 #자료구조
    g
    플레이스토어
    어플리케이션
    django
    라이프 스타일
    배달비 공유
    컨트리뷰터
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
Leffe_pt
[Gradle]그래들 알아보기 3 - Command-Line Interface Basics
상단으로

티스토리툴바