[1.2.0/AN-Config] Project 단 build.gradle.kts 에서 buildScript 문 삭제 #485
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
작업한 내용
buildScript
를 걷어냄작업 설명
Gradle 7.0 이상에서는
buldScript
대신plugins
와pluginManagement
를 사용해서 플러그인 의존성을 관리하라고 나와있습니다.제가 초기에 프로젝트 설정할 때, 이에 대한 지식이 부족해서 2가지 방식 모두 중복 적용했었네요 🥲
두 방식의 차이를 궁금해하실까봐 간략하게 설명 남기겠습니다.
buldScript 방식(legacy)
buildscript
는 Gradle이 빌드 스크립트를 실행하기 전에, 필요한 플러그인 의존성을 먼저 클래스패스에 추가하는 역할을 했습니다.다운 받을
repository
와 classPath를 지정해준 후, apply를 통해 플러그인을 적용했습니다.plugins 방식 + version catalog
pluginManagement
를 통해 plugin을 어느 저장소에서 다운받고 가져올지 지정plugins
을 활용하면 Gradle의 플러그인 시스템과 통합되어, 플러그인의 의존성 로딩과 적용을 통합할 수 있음referenece
Gradle 공식문서 - Using Plugins
🚀Next Feature