Skip to content

Commit

Permalink
Upgrade to RN 0.72 (#572)
Browse files Browse the repository at this point in the history
* sorry this is all in one commit

* upgrade some packages

* devapp namespace

* agp back to 8.0.1

* fix syntax

* remove reanimated

* set java version

* upgrade metro

* upgrade ios sdk

* set node version for bitrise

* coco update

* xcode updates

* add yarn

* coco version mismatch

* react native flipper

* AppDelegate updates supporting RN upgrade

* manifest and pod warning clean up

* jest env

* update react renderer

* override project settings

* include react native in build

* react path

* yarn add react-native-gradle-plugin

* hail mary

* hava_17

* heap space

* hava again

* no more constants

* incorrect package name

* detox imports

* androidTestImplementation "androidx.test:core:1.4.0"

* include detox in build.gradle

* package name

* fix detox release build

* Update android/build.gradle

Co-authored-by: chr-stripe <[email protected]>

* Update android/gradle.properties

Co-authored-by: chr-stripe <[email protected]>

* update snapshot

* fix unit tests

* update customer id

* fix dev app packaging

* update ios

* bump android to 3.2.0

* override flags

* chr feedback

---------

Co-authored-by: Brian Cooke <[email protected]>
Co-authored-by: chr-stripe <[email protected]>
  • Loading branch information
3 people authored Nov 27, 2023
1 parent 1836ae2 commit ce3cb02
Show file tree
Hide file tree
Showing 41 changed files with 3,737 additions and 3,634 deletions.
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
ios/.xcode.env.local

# Android/IJ
#
Expand All @@ -40,6 +41,9 @@ project.xcworkspace
local.properties
android.iml
*.hprof
.cxx/
*.keystore
!debug.keystore

# Ruby / CocoaPods
#
Expand All @@ -57,12 +61,6 @@ yarn-error.log
junit.xml
coverage/

# BUCK
buck-out/
\.buckd/
android/app/libs
android/keystores/debug.keystore

# Expo
.expo/*

Expand All @@ -79,3 +77,9 @@ test-butler-app.apk
/fastlane/README.md
/fastlane/report.xml
/fastlane/.env.default
/fastlane/test_output

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
# testing
/coverage
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.15.0
20.9.0
14 changes: 11 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.1.1'
// noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.codehaus.groovy:groovy-json:3.0.10'
Expand All @@ -28,11 +28,12 @@ def getExtOrIntegerDefault(name) {
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['StripeTerminalReactNative_' + name]).toInteger()
}

def terminalAndroidSdkVersion = '3.1.0'
def terminalAndroidSdkVersion = '3.2.0'
def reactNativeSdkVersion = getVersionFromNpm()

android {
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
namespace 'com.stripeterminalreactnative'
defaultConfig {
manifestPlaceholders = [REACT_NATIVE_SDK_VERSION: reactNativeSdkVersion]
minSdkVersion 26
Expand All @@ -53,6 +54,13 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}

kotlin {
jvmToolchain(17)
}

repositories {
Expand Down Expand Up @@ -129,7 +137,7 @@ def kotlin_version = getExtOrDefault('kotlinVersion')

dependencies {
// noinspection GradleDynamicVersion
api 'com.facebook.react:react-native:+'
api 'com.facebook.react:react-android:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.stripe:stripeterminal-core:$terminalAndroidSdkVersion"
implementation "com.stripe:stripeterminal-localmobile:$terminalAndroidSdkVersion"
Expand Down
9 changes: 7 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
StripeTerminalReactNative_compileSdkVersion=33
StripeTerminalReactNative_compileSdkVersion=34
StripeTerminalReactNative_kotlinVersion=1.8.21
StripeTerminalReactNative_targetSdkVersion=31
StripeTerminalReactNative_targetSdkVersion=33
android.useAndroidX=true
android.enableJetifier=true

org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4096M
org.gradle.configureondemand=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 1 addition & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.stripeterminalreactnative">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<meta-data
android:name="com.stripe.stripeterminal.is_react_native"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ class StripeTerminalReactNativeModule(reactContext: ReactApplicationContext) :

override fun getName(): String = "StripeTerminalReactNative"

override fun hasConstants(): Boolean = true

@ReactMethod
@Suppress("unused")
fun initialize(params: ReadableMap, promise: Promise) = withExceptionResolver(promise) {
Expand Down
9 changes: 7 additions & 2 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ workflows:
set -e
# This is a terrible hack, as I haven't worked out how Bitrise's `pod install` step interacts with the rbenv set in this app. You definitely shouldn't copy this.
cd dev-app/ios && asdf install ruby 3.2.2 && bundle install && \
gem install cocoapods -v 1.12.1 && pod install && cd - && \
gem install cocoapods -v 1.14.2 && pod install && cd - && \
echo "Checking for diffs in pod lockfile, if this fails please ensure all dependencies are up to date" && \
git diff --exit-code
title: Set up cocoapods
Expand Down Expand Up @@ -173,14 +173,19 @@ workflows:
machine_type_id: standard
prep_all:
steps:
- set-java-version@1:
inputs:
- set_java_version: '17'
- activate-ssh-key@4: {}
- git-clone@6: {}
- restore-npm-cache@1: {}
- restore-cocoapods-cache@1: {}
- script@1:
inputs:
- content: |-
asdf install nodejs 16.15.0
asdf install nodejs 20.9.0
asdf global nodejs 20.9.0
npm install -g yarn
echo 'export PATH="$PATH:~/project/node_modules/.bin:~/project/dev-app/node_modules/.bin"' >> $BASH_ENV
source $BASH_ENV
brew update >/dev/null
Expand Down
4 changes: 2 additions & 2 deletions dev-app/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '3.2.2'
gem 'cocoapods', '~> 1.11', '>= 1.12.1'
gem 'activesupport', '~> 7.0', '<= 7.0.8'
gem 'cocoapods', '~> 1.14.2'
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
26 changes: 13 additions & 13 deletions dev-app/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.1.0)
cocoapods (1.12.1)
cocoapods (1.14.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.12.1)
cocoapods-core (= 1.14.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-downloader (>= 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
Expand All @@ -32,8 +32,8 @@ GEM
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.12.1)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.14.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -44,7 +44,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-downloader (2.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
Expand All @@ -57,7 +57,7 @@ GEM
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.15.5)
ffi (1.16.3)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
Expand All @@ -71,13 +71,13 @@ GEM
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.7)
rexml (3.2.5)
rexml (3.2.6)
ruby-macho (2.5.1)
typhoeus (1.4.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.22.0)
xcodeproj (1.23.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -89,8 +89,8 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (~> 7.0, <= 7.0.8)
cocoapods (~> 1.11, >= 1.12.1)
activesupport (>= 6.1.7.3, < 7.1.0)
cocoapods (~> 1.14.2)

RUBY VERSION
ruby 3.2.2p53
Expand Down
Loading

0 comments on commit ce3cb02

Please sign in to comment.