Skip to content

Commit

Permalink
🕶️:: Merge pull request #43 from LookMonster/refactoring/#42-appRefac…
Browse files Browse the repository at this point in the history
…toring

파일 정리
  • Loading branch information
jjunhaa0211 authored Oct 10, 2023
2 parents d41c290 + 927a4b2 commit 58cbe6c
Show file tree
Hide file tree
Showing 54 changed files with 61 additions and 685 deletions.
22 changes: 2 additions & 20 deletions App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,20 @@ let project = Project(
sources: ["Sources/**"],
resources: ["Resources/**"],
dependencies: [
// .ResourceKit.Implement,

.ThirdParty.SPM.RIBs,
// .ThirdParty.RxRelay,
// .ThirdParty.RxSwift,

.LKNetwork.Implement,
.LKNetwork.Interface,

// .ThirdParty.SPM.Swinject,

// .Feature.Finance.Data.Interface,
// .Feature.Finance.Domain.Interface,
// .Feature.Finance.UserInterface.Interface,
//
// .Feature.Finance.Data.Implement,
// .Feature.Finance.Domain.Implement,
// .Feature.Finance.UserInterface.Implement,

.Features.User.Profile.UserProfile.UserInterface.Interface,
.Features.User.Profile.UserProfile.UserInterface.Implement,
.Features.User.Profile.UserProfile.UserInterface.Interface,


.Features.User.Main.Home.UserInterface.Interface,

// .Feature.Transport.UserInterface.Interface,


.Features.User.Main.Home.UserInterface.Implement,

// .Feature.Transport.UserInterface.Implement,


//style
.Features.User.Main.Style.Domain.Implement,
.Features.User.Main.Style.Data.Implement,
Expand Down
57 changes: 2 additions & 55 deletions App/Sources/AppRoot/AppRootComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,12 @@ import RIBs
import HomeUserInterface
import HomeUserInterfaceImpl

import FinanceUserInterface
import FinanceUserInterfaceImpl

import UserProfileUserInterface
import UserProfileUserInterfaceImpl

import StyleUserInterface
import StyleUserInterfaceImpl

import TransportUserInterface
import TransportUserInterfaceImpl

import FinanceData
import FinanceDataImpl

import FinanceDomain
import FinanceDomainImpl

import LKNetwork
import LKNetworkImpl

Expand All @@ -32,32 +20,9 @@ import CommunityUserInterfaceImpl
import ShopUserInterface
import ShopUserInterfaceImpl

final class AppRootComponent: Component<AppRootDependency>, AppHomeDependency, FinanceHomeDependency, UserProfileHomeDependency, TransportHomeDependency, TopupDependency, AddPaymentMethodDependency, StyleHomeDependency, CommunityDependency, ShopHomeDependency {

var fetchBalanceUseCase: FetchBalanceUseCase
var fetchCardsUseCase: FetchCardsUseCase
var topupBalanceUseCase: TopupBalanceUseCase

final class AppRootComponent: Component<AppRootDependency>, AppHomeDependency, UserProfileHomeDependency, StyleHomeDependency, CommunityDependency, ShopHomeDependency {

var cardsOnFileRepository: CardOnFileRepository

var addPaymentMethodUseCase: AddPaymentMethodUseCase

var superPayRepository: SuperPayRepository

lazy var transportHomeBuildable: TransportHomeBuildable = {
return TransportHomeBuilder(dependency: self)
}()

lazy var topupBuildable: TopupBuildable = {
return TopupBuilder(dependency: self)
}()

lazy var addPaymentMethodBuildable: AddPaymentMethodBuildable = {
return AddPaymentMethodBuilder(dependency: self)
}()

var topupBaseViewController: ViewControllable { rootViewcontroller.topViewControllable }
// var topupBaseViewController: ViewControllable { rootViewcontroller.topViewControllable }

private let rootViewcontroller: ViewControllable

Expand All @@ -72,24 +37,6 @@ final class AppRootComponent: Component<AppRootDependency>, AppHomeDependency, F

let network = NetworkImp(session: URLSession(configuration: config))

cardsOnFileRepository = CardOnFileRepositoryImpl(
network: network,
baseURL: BaseURL().mainURL
)

self.cardsOnFileRepository.fetch()

self.superPayRepository = SuperPayRepositoryImpl(
network: network,
baseURL: BaseURL().mainURL
)

self.addPaymentMethodUseCase = AddPaymentMethodUseCaseImpl(cardOnFileRepository: cardsOnFileRepository)

self.fetchBalanceUseCase = FetchBalanceUseCaseImpl(superPayRepository: superPayRepository)
self.fetchCardsUseCase = FetchCardsUseCaseImpl(cardOnFileRepository: cardsOnFileRepository)
self.topupBalanceUseCase = TopupBalanceUseCaseImpl(superPayRepository: superPayRepository)

self.rootViewcontroller = rootViewcontroller
super.init(dependency: dependency)
}
Expand Down
8 changes: 8 additions & 0 deletions App/Sources/AppRoot/AppRootInteractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ protocol AppRootListener: AnyObject {
}

final class AppRootInteractor: PresentableInteractor<AppRootPresentable>, AppRootInteractable, AppRootPresentableListener, URLHandler {
func searchButtonTap() {

}

func penButtonTap() {

}


func homeBackground() {
print("나중에 지워야함")
Expand Down
2 changes: 1 addition & 1 deletion App/Sources/AppRoot/AppRootRouter.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import RIBs
import RIBsUtil
import FinanceUserInterface
//import FinanceUserInterface
import HomeUserInterface
import UserProfileUserInterface
import StyleUserInterface
Expand Down
5 changes: 0 additions & 5 deletions Core/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@ let project = Project(name: "Core",
Project.makeTarget(
name: "SuperUI",
dependencies: [
// .ThirdParty.SPM.RIBs,
// .ThirdParty.RxSwift,
.Core.RIBsUtil,
.ThirdParty.SPM.RxCocoa,
.ThirdParty.SPM.RxSwift,
.ThirdParty.SPM.RxBlocking,
.ThirdParty.SPM.RxRelay,
.ThirdParty.SPM.SnapKit,
.ThirdParty.SPM.Then,
// .ThirdParty.SPM.Kingfisher,
.DesignSystem.Implement,
.ThirdParty.SPM.Swinject
]
Expand All @@ -34,8 +31,6 @@ let project = Project(name: "Core",
name: "RIBsUtil",
dependencies: [
.ThirdParty.SPM.RIBs,
// .ThirdParty.RxSwift,
// .ThirdParty.SPM.Swinject
]
)
])
19 changes: 4 additions & 15 deletions DesignSystem/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ import UtilityPlugin

let project = Project(
name: "DesignSystem",
// organizationName: "com.monster.lookMonster",
// settings: .settings(configurations: [
// .debug(name: "Debug", xcconfig: .relativeToRoot("Config/Debug.xcconfig")),
// .release(name: "Release", xcconfig: .relativeToRoot("Config/Release.xcconfig")),
// ]),
targets: [
Target(
name: "DesignSystem",
Expand All @@ -30,14 +25,11 @@ let project = Project(
infoPlist: .default,
sources: ["Sources/**"],
dependencies: [
// .ThirdParty.SPM.SnapKit,
.ThirdParty.SPM.SnapKit,
.ThirdParty.SPM.Then,
.ResourceKit.Implement,
.ThirdParty.SPM.RxCocoa,
.ThirdParty.SPM.RxSwift,
// .ThirdParty.SPM.Kingfisher,
// .ThirdParty.SPM.Swinject,
// .ThirdParty.SPM.SkeletonView
.ThirdParty.SPM.RxSwift
]),
Target(
name: "DesignSystemDemoApp",
Expand All @@ -62,14 +54,11 @@ let project = Project(
dependencies:
[
.target(name: "DesignSystem"),
// .ThirdParty.SPM.SnapKit,
.ThirdParty.SPM.SnapKit,
.ThirdParty.SPM.Then,
.ResourceKit.Implement,
.ThirdParty.SPM.RxCocoa,
.ThirdParty.SPM.RxSwift,
// .ThirdParty.SPM.Kingfisher,
// .ThirdParty.SPM.Swinject,
// .ThirdParty.SPM.SkeletonView
.ThirdParty.SPM.RxSwift
]
)

Expand Down
1 change: 0 additions & 1 deletion DesignSystem/Sources/MonsterPhoto/Monster+PhotoView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import UIKit
import Kingfisher
import SnapKit
import RxCocoa
import RxSwift
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import UIKit
import Kingfisher
import SnapKit
import RxCocoa
import RxSwift
Expand Down
13 changes: 1 addition & 12 deletions Features/User/Auth/Login/LoginData/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,8 @@ let project = Project.invertedDualTargetProject(
iOSTargetVersion: "15.0.0",
interfaceDependencies: [
.LKNetwork.Interface,

// .ThirdParty.SPM.RxSwift,
// .ThirdParty.SPM.RxRelay,

// .Feature.Finance.Domain.Interface,

],
implementDependencies: [
.LKNetwork.Interface,

// .ThirdParty.SPM.RxSwift,
// .ThirdParty.SPM.RxRelay,

// .Feature.Finance.Domain.Interface,
.LKNetwork.Interface
]
)
2 changes: 0 additions & 2 deletions Features/User/Auth/Login/LoginDomain/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ let project = Project.invertedDualTargetProject(
platform: .iOS,
iOSTargetVersion: "15.0.0",
interfaceDependencies: [
// .ThirdParty.SPM.RxSwift,
],
implementDependencies: [
// .ThirdParty.SPM.RxSwift,
.TokenManager.Interface
]
)
11 changes: 1 addition & 10 deletions Features/User/Auth/Login/LoginUserInterface/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,19 @@ let project = Project.invertedDualTargetProjectWithDemoApp(
platform: .iOS,
iOSTargetVersion: "15.0.0",
interfaceDependencies: [
// .Feature.Finance.Domain.Interface,

.Core.RIBsUtil,
.TokenManager.Interface
],
implementDependencies: [
// .Feature.Finance.Domain.Interface,
// .Feature.Finance.Data.Interface,

.Core.SuperUI,
.Core.DefaultsStore,

// .ThirdParty.SPM.RxSwift,
// .ThirdParty.SPM.RxRelay,
// .ThirdParty.SPM.SnapKit,
// .ThirdParty.SPM.Swinject,
.DesignSystem.Implement
],
demoAppDependencies: [
.Features.User.Auth.Login.Data.Implement,
.Features.User.Auth.Login.Domain.Implement,
// .ThirdParty.SPM.Swinject,

.LKNetwork.Implement,
.TokenManager.Implement
],
Expand Down
15 changes: 2 additions & 13 deletions Features/User/Auth/SignUp/SignUpData/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,9 @@ let project = Project.invertedDualTargetProject(
platform: .iOS,
iOSTargetVersion: "15.0.0",
interfaceDependencies: [
.LKNetwork.Interface,

// .ThirdParty.SPM.RxSwift,
// .ThirdParty.SPM.RxRelay,

// .Feature.Finance.Domain.Interface,

.LKNetwork.Interface
],
implementDependencies: [
.LKNetwork.Interface,

// .ThirdParty.SPM.RxSwift,
// .ThirdParty.SPM.RxRelay,

// .Feature.Finance.Domain.Interface,
.LKNetwork.Interface
]
)
6 changes: 1 addition & 5 deletions Features/User/Auth/SignUp/SignUpDomain/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ let project = Project.invertedDualTargetProject(
name: "signUpDomain",
platform: .iOS,
iOSTargetVersion: "15.0.0",
interfaceDependencies: [
// .ThirdParty.SPM.RxSwift,
],
interfaceDependencies: [],
implementDependencies: [
// .ThirdParty.SPM.RxSwift,
// .Feature.Finance.Data.Interface,
.TokenManager.Interface
]
)
8 changes: 0 additions & 8 deletions Features/User/Auth/SignUp/SignUpUserInterface/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,12 @@ let project = Project.invertedDualTargetProjectWithDemoApp(
platform: .iOS,
iOSTargetVersion: "15.0.0",
interfaceDependencies: [
// .Feature.Finance.Domain.Interface,

.Core.RIBsUtil,
.TokenManager.Interface
],
implementDependencies: [
// .Feature.Finance.Domain.Interface,
// .Feature.Finance.Data.Interface,

.Core.SuperUI,
.Core.DefaultsStore,
// .ThirdParty.SPM.RxSwift,
// .ThirdParty.SPM.RxRelay,
// .ThirdParty.SPM.SnapKit,
.DesignSystem.Implement
]
)
Expand Down
6 changes: 2 additions & 4 deletions Features/User/Main/Community/CommunityData/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ let project = Project.invertedDualTargetProject(
name: "CommunityData",
platform: .iOS,
iOSTargetVersion: "15.0.0",
interfaceDependencies: [
],
implementDependencies: [
]
interfaceDependencies: [],
implementDependencies: []
)

7 changes: 2 additions & 5 deletions Features/User/Main/Community/CommunityDomain/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ let project = Project.invertedDualTargetProject(
name: "CommunityDomain",
platform: .iOS,
iOSTargetVersion: "15.0.0",
interfaceDependencies: [
// .ThirdParty.SPM.RxSwift,
],
implementDependencies: [
]
interfaceDependencies: [],
implementDependencies: []
)

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Then
import RxCocoa
import SuperUI
import RxSwift
import Kingfisher
import SuperUI
import DesignSystem
import ResourceKit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import CommunityUserInterface
import RxSwift
import RxCocoa
import SuperUI
import SkeletonView

class PopularViewController: BaseViewController,
UICollectionViewDelegateFlowLayout,
Expand Down
Loading

0 comments on commit 58cbe6c

Please sign in to comment.