Link Search Menu Expand Document

Gradle 빌드 성능 최적화

공식 문서를 기반으로 1차 작성 완료
테스트 후 결과 공유 예정

Table of contents

  1. Easy improvements
  2. configuration
  3. dependency
  4. 프로파일링
  5. configuration-cache
  6. 참고

Easy improvements

configuration

  • 플러그인을 모든 프로젝트에 적용하는게 아니라 필요 프로젝트에만 적용

dependency

  • 동적 및 스냅샵 버전 최소화
    • 2.+와 같이 +형태 지양
  • 불필요하고 사용하지 않는 dependenccy 제거
  • repository수 최소화
  • 프로파일링을 통해 다운로드 속도가 느린 dependency확인

프로파일링

  • Grade Enterprise 빌드 스캔
    • ./gradlew build --scan 을 수행
    • Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? [yes, no] yes 적고 엔터
    • https://gradle.com/s/p7ge6o552lumg 으로 최종 URL이 나옴
    • 페이지에 진입하면 email을 적는 화면이 나옴
    • email을 통해 인증을 하고 나면, 빌드 스캔 결과를 볼 수 있음
    • Grade Enterprise기능으로 30일 무료
  • 간단한 프로파일링
    • ./gradlew --profile

configuration-cache

참고