Posts Gradle 빌드 라이프사이클
Post
Cancel

Gradle 빌드 라이프사이클

Settings File

image

  • Early in the Gradle Build lifecycle, the initialization phase finds the settings file in your project root directory.
  • When the settings file settings.gradle(.kts) is found, Gradle instantiates a Settings object.
  • One of the purposes of the Settings object is to allow you to declare all the projects to be included in the build.
  • As the settings script executes, it configures this Settings.
  • Therefore, the settings file defines the Settings.

Settings Object

The Settings object is part of the Gradle API.

  • Many top-level properties and blocks in a settings script are part of the Settings API.
  • For example, we can set the root project name in the settings script using the Settings.rootProject property:
    1
    
    settings.rootProject.name = "root"
    
  • Which is usually shortened to:
    1
    
    rootProject.name = "root"
    

참고자료


  • https://docs.gradle.org/current/userguide/writing_settings_files.html
This post is licensed under CC BY 4.0 by the author.

Gradle 멀티 프로젝트

Gradle 빌드 파일