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

Refactor build configs (build.gradle, Podfile) #305

Merged
merged 9 commits into from May 21, 2022

Conversation

WoonHaKim
Copy link
Contributor

@WoonHaKim WoonHaKim commented May 20, 2022

AS-IS

기존에 쓰고 있는 다른 라이브러리의 kakao sdk나 build tool (ex. gradle tools) 의 버전과 mismatch 되어 빌드에 문제 발생.

Solution

  • create-react-native-library 의 템플릿을 참고로 하여 root project의 kotlinVersion, compileSdkVersion, targetSdkVersion, gradleVersion 등을 우선적으로 바라보도록 build.gradle 수정
  • RNFirebase의 서브 프로젝트 Podfile 버전 참조 방식을 참고로 하여, Podfile에 $KakaoSDKVersion 추가 및 package.json에 지정된 값을 먼저 가져오도록 수정

TO-BE

  1. Android: rootProject의 환경변수를 먼저 가져오고 fallback으로 gradle.properties에 지정된 값을 기본값으로 사용.
  2. iOS: package.json에 설정된 sdkVersions.ios.kakao 의 버전을 기본으로 가져오되, $KakaoSDKVersionPodfile에 지정된 경우 이를 우선 사용 함. ($KakaoSDKVersion은 호환성을 체크하고 신중히 사용 하셔야 합니다.) -> podfile에 kakao_sdk_version을 사용합니다.
  3. kakaoSDKs version: 2.9.0 -> 2.9.1 bump

@WoonHaKim
Copy link
Contributor Author

closes #304

Copy link
Member

@hyochan hyochan left a comment

Choose a reason for hiding this comment

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

훌륭한 PR 감사드립니다.

소소한 리뷰 확인 부탁드립니다 🙏

android/build.gradle Outdated Show resolved Hide resolved
@@ -3,6 +3,8 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ

platform :ios, '11.0'

# $KakaoSDKVersion = "2.9.0"
Copy link
Member

Choose a reason for hiding this comment

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

라이브러리 호환성을 위해서 default로 설정을 해주는게 좋지 않을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

테스트를 위한 코맨트가 남아있었군요. kakao-login.podspec의 kakao_sdk_version을 기본으로 사용하도록 수정되었습니다.
2.9.1에서 별 문제는 없었으나, 만약의 호환성을 위해 sdk버전이 2.9.0로 롤백되었습니다. 감사합니다.

@hyochan hyochan added 🍗 enhancement New feature or request 🚽 migration Activities due to changes in framework 👷‍♀️ build Build issue dependencies Pull requests that update a dependency file labels May 20, 2022
@WoonHaKim WoonHaKim requested a review from hyochan May 20, 2022 16:27
Copy link
Member

@hyochan hyochan left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 🙏

@hyochan hyochan merged commit 78357ae into crossplatformkorea:master May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👷‍♀️ build Build issue dependencies Pull requests that update a dependency file 🍗 enhancement New feature or request 🚽 migration Activities due to changes in framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants