-
Notifications
You must be signed in to change notification settings - Fork 1
코루틴 테스트 환경 설정 및 core:test 모듈 추가 #6
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
- core:test 모듈 추가 (JUnit5 + Coroutines Test 지원) - FeatureConventionPlugin에 testImplementation 자동 의존성 추가 - DependencyHandlerScope에 testImplementation(Project) 확장 함수 추가 - ExampleTest.kt로 코루틴 테스트 예제 작성 🤖 Generated with [Firebender](https://firebender.com) Co-Authored-By: Firebender <help@firebender.com>
## 개선 사항 ### 1. Compose 의존성 중복 제거 - AndroidComposeConventionPlugin에서 중복 의존성 선언 제거 - configureCompose() 함수에서 일괄 관리 ### 2. kotlinx-coroutines-core 중복 제거 - AndroidLibraryConventionPlugin에서 한 번만 선언 - DataConventionPlugin에서 중복 제거 (상위에서 상속) ### 3. 테스트 의존성 분리 - AndroidTestConventionPlugin 신규 추가 - 모든 모듈에 자동 추가되던 테스트 의존성을 선택적으로 적용 가능 - 테스트가 필요한 모듈에서만 명시적으로 적용 ### 4. AndroidLibraryConventionPlugin 최적화 - 불필요한 테스트 의존성 제거 - 기본 코루틴 의존성만 유지 ## 장점 - 빌드 시간 단축 (불필요한 의존성 감소) - 명확한 의존성 관리 - 유지보수성 향상 🤖 Generated with [Firebender](https://firebender.com) Co-Authored-By: Firebender <help@firebender.com>
- twix.android.test 플러그인 자동 적용 - Feature 모듈은 기본적으로 테스트를 포함하므로 자동 추가 - ExampleTest 실행 오류 수정 🤖 Generated with [Firebender](https://firebender.com) Co-Authored-By: Firebender <help@firebender.com>
- twix.android.test 플러그인 자동 적용 - Feature 모듈은 기본적으로 테스트를 포함하므로 자동 추가 - ExampleTest 실행 오류 수정
dogmania
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.
고생하셨습니다! 테스트 모듈 분리하는 거 좋네요👍
| "twix.android.library", | ||
| "twix.android.compose", | ||
| "twix.android.test", | ||
| "twix.koin", |
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.
이전 pr에서 남겼던 것처럼 apply, Class 조합으로 수정하는 건 어떨까요??
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.
좋아 ! 제네릭 최고 ~~
리뷰 반영 커밋 : 976b20b
🤖 Generated with [Firebender](https://firebender.com) Co-Authored-By: Firebender <help@firebender.com>
이슈 번호
#1
리뷰/머지 희망 기한 (선택)
작업내용
일전에 이야기 했던 테스트 할 때 사용하는 코루틴 디스패처 class를 모든 feature 모듈에서
쓸 수 있도록 모듈로 분리해봤어 ! 혹시나 나중에 추가로 테스트 관련 공통 코드가 늘어나면 여기 추가하면
좋을 것 같아서 분리해봤는데 어떻게 생각해 ?
왜 수정했는지?
무엇을 구현했는지?
core:test 모듈 생성
CoroutinesTestExtension: TestDispatcher 자동 설정FeatureConventionPlugin 개선
testImplementation(project(":core:test"))자동 의존성 추가DependencyHandlerScope 확장
testImplementation(project: Project)확장 함수 추가ExampleTest.kt 작성
결과물
테스트 코드 예제