-
Notifications
You must be signed in to change notification settings - Fork 0
Gradle 빌드 로직을 모듈화하고 Convention Plugin을 추가합니다. #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3d569c7 to
54f750a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces Gradle build modularization and Convention Plugins to standardize Android application configurations and dependency management across the project.
- Adds build-logic module with Convention Plugins for Android applications and Compose setup
- Introduces centralized dependency management through libs.versions.toml with comprehensive library definitions
- Enables Gradle performance optimizations and simplifies app module build script
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle.kts | Enables typesafe project accessors and includes build-logic module |
| gradle/libs.versions.toml | Comprehensive dependency catalog with versions for Android, Compose, testing, and networking |
| gradle.properties | Enables parallel builds, caching, and configuration cache for performance |
| build-logic/ | New module containing Convention Plugins and utility functions |
| app/build.gradle.kts | Simplified build script using Convention Plugins instead of manual configuration |
Comments suppressed due to low confidence (1)
app/build.gradle.kts:13
- The dependencies block only includes JUnit for testing but lacks Android instrumentation tests. Consider adding
androidx-test-ext-junitandespresso-coredependencies that were removed during the Convention Plugin migration.
dependencies {
| import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile | ||
|
|
||
| internal fun Project.configureKotlinAndroid( | ||
| commonExtension: CommonExtension<*, *, *, * ,*, *> |
Copilot
AI
Jul 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space before comma in generic type parameters. Should be CommonExtension<*, *, *, *, *, *>
| commonExtension: CommonExtension<*, *, *, * ,*, *> | |
| commonExtension: CommonExtension<*, *, *, *, *, *> |
| internal fun Project.configureKotlinAndroid( | ||
| commonExtension: CommonExtension<*, *, *, * ,*, *> | ||
| ) { | ||
| commonExtension.apply { | ||
| compileSdk = 36 |
Copilot
AI
Jul 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded SDK version (36) should be extracted to a constant or version catalog to ensure consistency across Convention Plugins and easier maintenance.
| internal fun Project.configureKotlinAndroid( | |
| commonExtension: CommonExtension<*, *, *, * ,*, *> | |
| ) { | |
| commonExtension.apply { | |
| compileSdk = 36 | |
| private const val COMPILE_SDK_VERSION = 36 | |
| internal fun Project.configureKotlinAndroid( | |
| commonExtension: CommonExtension<*, *, *, * ,*, *> | |
| ) { | |
| commonExtension.apply { | |
| compileSdk = COMPILE_SDK_VERSION |
| fun ApplicationExtension.configureDefaultConfig() { | ||
| defaultConfig { | ||
| applicationId = "com.plottwist.tuk" | ||
| targetSdk = 36 |
Copilot
AI
Jul 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded target SDK version (36) should be extracted to a constant or version catalog to ensure consistency with compile SDK and easier maintenance.
| targetSdk = 36 | |
| targetSdk = libs.versions.targetSdk.get().toInt() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review by ChatGPT
eff1485 to
8c365a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review by ChatGPT
| ## Test | ||
| junit = "4.13.2" | ||
| androidx-test-ext-junit = "1.2.1" | ||
| junit-platform-launcher = "1.13.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
의도 확인 필요:
jetbrainsKotlinJvm의 버전을 제거하고kotlin이라는 다른 참조로 변경하는 부분이 있지만,kotlin버전이 어떻게 정의되는지 확인할 필요가 있습니다. 만약kotlin이라는 참조가 존재하지 않거나 잘못된 값을 가리킨다면, 빌드 오류가 발생할 수 있습니다. -
버전 관리:
kotlin의 정확한 버전이 명시되어 있지 않기 때문에, 향후 업데이트나 호환성 문제를 우려할 수 있습니다. 반드시 의도한 특정 버전이 있는지 확인하고 명시하는 것이 좋습니다. -
의존성 변경 검토:
jetbrainsKotlinJvm에서kotlin으로 변경하면서 의존성이 어떻게 변하는지 검토해보아야 합니다. 특히, 기존 코드에서 사용되던jetbrainsKotlinJvm관련 기능이 제대로 작동하는지 테스트를 통해 확인해야 합니다. -
전반적인 테스트 필요: 이 패치 후에 전체 애플리케이션에 대한 테스트를 실행하여 기존 기능이 손상되지 않았는지 확인하는 것이 중요합니다.
ny2060
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
코파일럿이 든든하네요...👍
작업
참고사항
코파일럿 요약
🎯 주요 변경 사항 요약
📦 Gradle 빌드 모듈화 및 플러그인 개선
Custom Convention Plugin 도입
AndroidApplicationConventionPlugin과 AndroidApplicationComposeConventionPlugin을 추가하여
Android 앱 및 Compose 설정을 공통화하고, 자동 적용되도록 모듈화함.
→ 반복되는 설정을 제거하고, build script를 간결하게 유지
중앙 집중식 의존성 관리
libs.versions.toml 파일을 도입해 라이브러리 및 버전 정보를 한곳에서 관리
→ MVI, DI, Network, Logging, Compose 등 주요 의존성 버전 추가 및 정리
⚙️ 빌드 시스템 개선
병렬 빌드 및 캐시 활성화
gradle.properties에 병렬 빌드, 빌드 캐시, 구성 캐시 설정을 추가해 빌드 속도 향상
의존성 해상도 및 빌드 로직 설정
settings.gradle.kts에서 저장소 및 build-logic 모듈을 포함하여 Convention Plugin이 적용되도록 구성
🧹 코드 간소화 및 구조 정리
기존 중복 설정 제거
app/build.gradle.kts의 불필요한 설정 제거 → Convention Plugin으로 대체
공통 설정 유틸 함수화
configureAndroidCompose, configureDefaultConfig, configureKotlinAndroid 등 공통 설정을 함수로 추출하여 재사용성과 명확성 향상