[FR]: Re assess the dependencies in the multi module setup

Đang mở
#2,103 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
kotlin
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu với tệp build của core:data và xem xét các dependency hiện được khai báo là api, cùng với cách feature module truy cập các network type. So sánh khả năng hiển thị của các dependency đó với các khai báo implementation được đề xuất; công việc được xem là hoàn tất khi đã đi đến và ghi lại một quyết định về ranh giới module dự kiến, đồng thời cập nhật các khai báo nếu quyết định đó được chấp nhận.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement
Is there an existing issue for this?
  • I have searched the existing issues
Describe the problem
Image

Look at the picture above. I am able to access stuff from the network module right in the feature module . This in my opinion is a breach of engineering practices where in the scope of a component should only be limited to what it needs .

Perhaps we should address the dependencies mentioned as "apis" in core:data build file , and look into making them "implementation" ?

This decision of making use of apis in core:data has been done intentionally though , but can you please present an argument against what i have suggested ?

Describe the solution
dependencies {
    implementation(projects.core.common)
    implementation(projects.core.database)
    implementation(projects.core.datastore)
    implementation(projects.core.network)

    implementation(projects.core.analytics)
    implementation(projects.core.notifications)

    testImplementation(libs.kotlinx.coroutines.test)
    testImplementation(libs.kotlinx.serialization.json)
    testImplementation(projects.core.datastoreTest)
    testImplementation(projects.core.testing)
}

In my opinion this is how the core:data should look like

Additional context
Image
Code of Conduct
  • I agree to follow this project's Code of Conduct
Ngôn ngữ chính
Kotlin
Star
22.1k
Fork
4.7k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của android/nowinandroid

Tất cả issue của android/nowinandroid

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.