Skip to content

Conversation

@eshc123
Copy link
Member

@eshc123 eshc123 commented Jul 16, 2025

작업

  • build-logic 모듈 추가 및 Gradle Composite Build 설정
  • AndroidApplicationConventionPlugin 및 AndroidApplicationComposeConventionPlugin 작성
  • libs.versions.toml 파일 추가 및 의존성 버전 정의
  • app/build.gradle.kts의 중복 설정 제거 및 Convention Plugin 적용

참고사항

  • 이번 PR은 app 모듈에만 적용되며, library나 app이 아닌 모듈용 Convention Plugin은 추후 별도로 작업할 예정입니다.
  • libs.versions.toml에 이후에 사용할 의존성도 다수 추가시켜두었습니다.
코파일럿 요약

🎯 주요 변경 사항 요약
📦 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 등 공통 설정을 함수로 추출하여 재사용성과 명확성 향상

@eshc123 eshc123 requested a review from ny2060 July 16, 2025 17:04
@eshc123 eshc123 self-assigned this Jul 16, 2025
@eshc123 eshc123 force-pushed the feature/build-logic-application branch 2 times, most recently from 3d569c7 to 54f750a Compare July 16, 2025 17:46
@eshc123 eshc123 requested a review from Copilot July 16, 2025 17:56
Copy link
Contributor

Copilot AI left a 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-junit and espresso-core dependencies that were removed during the Convention Plugin migration.
dependencies {

import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

internal fun Project.configureKotlinAndroid(
commonExtension: CommonExtension<*, *, *, * ,*, *>
Copy link

Copilot AI Jul 16, 2025

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<*, *, *, *, *, *>

Suggested change
commonExtension: CommonExtension<*, *, *, * ,*, *>
commonExtension: CommonExtension<*, *, *, *, *, *>

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +14
internal fun Project.configureKotlinAndroid(
commonExtension: CommonExtension<*, *, *, * ,*, *>
) {
commonExtension.apply {
compileSdk = 36
Copy link

Copilot AI Jul 16, 2025

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
fun ApplicationExtension.configureDefaultConfig() {
defaultConfig {
applicationId = "com.plottwist.tuk"
targetSdk = 36
Copy link

Copilot AI Jul 16, 2025

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.

Suggested change
targetSdk = 36
targetSdk = libs.versions.targetSdk.get().toInt()

Copilot uses AI. Check for mistakes.
Copy link

@github-actions github-actions bot left a 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

@eshc123 eshc123 force-pushed the feature/build-logic-application branch from eff1485 to 8c365a2 Compare July 17, 2025 05:25
Copy link

@github-actions github-actions bot left a 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"

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 관련 기능이 제대로 작동하는지 테스트를 통해 확인해야 합니다.

  • 전반적인 테스트 필요: 이 패치 후에 전체 애플리케이션에 대한 테스트를 실행하여 기존 기능이 손상되지 않았는지 확인하는 것이 중요합니다.

Copy link
Collaborator

@ny2060 ny2060 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코파일럿이 든든하네요...👍

@eshc123 eshc123 merged commit 072ab24 into dev Jul 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants