Skip to content
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

[TNT-80] Static Library에서도 Preview를 사용 가능하도록 Tuist 수정 #29

Merged
merged 4 commits into from
Jan 25, 2025

Conversation

syss220211
Copy link
Member

@syss220211 syss220211 commented Jan 23, 2025

📌 What is the PR?

  • staticlibrary에서도 프리뷰를 사용할 수 있도록 tuist 설정을 수정하였습니다.

🪄 Changes

  • Scheme에 Debug, Release 모두 추가
  • mergedBinaryType, mergeable 설정 추가
  • Tuist 버전 고정 추가
  • 자세한 사항은 노션 Trouble Shooting을 참고해주세요. Tuist Trouble Shooting
  • TBottomButton에 isEnable을 추가하고 ignoreSafearea 설정을 삭제하였습니다. TBottomButton 문서

🌐 Common Changes

🔥 PR Point

let tuist = Tuist.init(
    project: .tuist(
        compatibleXcodeVersions: ["16.2"]
    )
)

static func dynamicFrameworkProject(
    name: String,
    resources: Bool,
    dependencies: [TargetDependency] = [],
    packages: [Package] = []
) -> Project {
    let debugScheme = Scheme.scheme(
        schemeName: "\(name)Debug",
        targetName: name,
        configurationName: .debug
    )

    let releaseScheme = Scheme.scheme(
        schemeName: "\(name)Release",
        targetName: name,
        configurationName: .release
    )
    
    return Project(
        name: name,
        options: customOption,
        settings: Configuration.defaultSettings(),
        targets: [
            Target.dynamicLibraryTarget(
                name: name,
                resource: resources,
                dependencies: DependencyInformation.dependencies(of: name)
            )
        ],
        schemes: [debugScheme, releaseScheme]
    )
}

📸 Screenshot

기능 스크린샷
GIF

🙆🏻 To Reviewers

💭 Related Issues

- static library에서도 프리뷰 사용 가능하도록 tuist 세팅 수정
- TBottomButton에 isEnabled 추가
- dynamic으로 원하는 모듈이 있는 경우 dynamic으로 수정 가능
@syss220211 syss220211 requested a review from FpRaArNkK January 23, 2025 12:13
@syss220211 syss220211 changed the title [Refactor] Static Library에서도 Preview를 사용 가능하도록 Tuist 수정 [TNT-80] Static Library에서도 Preview를 사용 가능하도록 Tuist 수정 Jan 23, 2025
@FpRaArNkK FpRaArNkK added the ⚙️Setting 프로젝트 설정 변경 (Build Settings, Info.plist 수정 등) label Jan 23, 2025
Copy link
Contributor

@FpRaArNkK FpRaArNkK left a comment

Choose a reason for hiding this comment

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

static 관련 프리뷰 정말 고생많으셨습니다 ㅠㅠ 덕분에 편하게 작업할 수 있겠네요..!
몇가지 사항을 코멘트에 적어놓았는데, 확인 후 반영 부탁드립니다!

Comment on lines 145 to 149
struct TNavigationView: View {
var body: some View {
TNavigation(type: .LButton(leftImage: .icnArrowDown))
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

해당 Struct는 어떤 용도로 사용하는 걸까요??

Copy link
Member Author

Choose a reason for hiding this comment

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

이거 프리뷰 테스트 용으로 만들었던 것 같습니다... (?) 발견 감사해요 수정해놓을게요!

Comment on lines +10 to +14
let tuist = Tuist.init(
project: .tuist(
compatibleXcodeVersions: ["16.2"]
)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

이런 세팅이 있는 줄은 처음 알았네요..! 협업 시 너무 좋은 것 같습니다 👍👍

Comment on lines 11 to 15
.TnTApp: [.Presentation, .DesignSystem],
.Presentation: [.DesignSystem, .Domain, .ComposableArchitecture],
.Domain: [.Data, .SwiftDepedencies, .KakaoSDKUser],
.Data: [],
.DesignSystem: [.ComposableArchitecture, .Lottie],
Copy link
Contributor

@FpRaArNkK FpRaArNkK Jan 23, 2025

Choose a reason for hiding this comment

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

요부분 관련해서 전에 얘기했었던 내용들도 추가로 반영해주실 수 있을까요?!

  • Domain -> Data를 지우고, Data -> Domain로 변경
  • App -> Data 추가
  • Data -> KakaoSDK 로 변경
  • DesignSystem -> TCA 삭제
    모듈 구조 v2 내용 정리 문서 정리해놓았습니다!
    추가로 App에 디자인 시스템 들어가게된 이유도 궁금해요!

Copy link
Member Author

Choose a reason for hiding this comment

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

이것도.. 이것저것 테스트하다가 추가된 것같은데 말씀해주신 사항 수정해놓을게요.

Comment on lines +31 to +42
static func dependencies(of name: String) -> [TargetDependency] {
guard let name = DependencyInformation(rawValue: name) else { return [] }
guard let modules: [DependencyInformation] = dependencyInfo[name] else { return [] }

return modules.map { module in
let name = module.rawValue

if externalDependency.contains(module) {
return .external(name: name)
} else {
return .project(target: name, path: .relativeToRoot("Projects/\(name)"))
}
Copy link
Contributor

Choose a reason for hiding this comment

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

더 깔끔해지고 모듈 확장성이 좋아졌네요! 👍👍

Copy link
Contributor

Choose a reason for hiding this comment

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

안 쓰이는 내용은 정리해주시면 좋을 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

넵!

Copy link
Contributor

@FpRaArNkK FpRaArNkK left a comment

Choose a reason for hiding this comment

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

굳 좋습니다 고생하셨습니다!

@FpRaArNkK FpRaArNkK merged commit a18a321 into develop Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️Setting 프로젝트 설정 변경 (Build Settings, Info.plist 수정 등)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants