Skip to content

Commit 079db95

Browse files
committed
chore: migrate to RN67 & upgrade deps
1 parent 443b66c commit 079db95

File tree

78 files changed

+900
-1817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+900
-1817
lines changed

template/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ build/
2929
local.properties
3030
*.iml
3131
*.hprof
32+
3233
# node.js
3334
#
3435
node_modules/

template/Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby '2.7.4'
5+
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

template/Gemfile.lock

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.5)
5+
rexml
6+
activesupport (6.1.4.4)
7+
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
i18n (>= 1.6, < 2)
9+
minitest (>= 5.1)
10+
tzinfo (~> 2.0)
11+
zeitwerk (~> 2.3)
12+
addressable (2.8.0)
13+
public_suffix (>= 2.0.2, < 5.0)
14+
algoliasearch (1.27.5)
15+
httpclient (~> 2.8, >= 2.8.3)
16+
json (>= 1.5.1)
17+
atomos (0.1.3)
18+
claide (1.1.0)
19+
cocoapods (1.11.2)
20+
addressable (~> 2.8)
21+
claide (>= 1.0.2, < 2.0)
22+
cocoapods-core (= 1.11.2)
23+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
24+
cocoapods-downloader (>= 1.4.0, < 2.0)
25+
cocoapods-plugins (>= 1.0.0, < 2.0)
26+
cocoapods-search (>= 1.0.0, < 2.0)
27+
cocoapods-trunk (>= 1.4.0, < 2.0)
28+
cocoapods-try (>= 1.1.0, < 2.0)
29+
colored2 (~> 3.1)
30+
escape (~> 0.0.4)
31+
fourflusher (>= 2.3.0, < 3.0)
32+
gh_inspector (~> 1.0)
33+
molinillo (~> 0.8.0)
34+
nap (~> 1.0)
35+
ruby-macho (>= 1.0, < 3.0)
36+
xcodeproj (>= 1.21.0, < 2.0)
37+
cocoapods-core (1.11.2)
38+
activesupport (>= 5.0, < 7)
39+
addressable (~> 2.8)
40+
algoliasearch (~> 1.0)
41+
concurrent-ruby (~> 1.1)
42+
fuzzy_match (~> 2.0.4)
43+
nap (~> 1.0)
44+
netrc (~> 0.11)
45+
public_suffix (~> 4.0)
46+
typhoeus (~> 1.0)
47+
cocoapods-deintegrate (1.0.5)
48+
cocoapods-downloader (1.5.1)
49+
cocoapods-plugins (1.0.0)
50+
nap
51+
cocoapods-search (1.0.1)
52+
cocoapods-trunk (1.6.0)
53+
nap (>= 0.8, < 2.0)
54+
netrc (~> 0.11)
55+
cocoapods-try (1.2.0)
56+
colored2 (3.1.2)
57+
concurrent-ruby (1.1.9)
58+
escape (0.0.4)
59+
ethon (0.15.0)
60+
ffi (>= 1.15.0)
61+
ffi (1.15.5)
62+
fourflusher (2.3.1)
63+
fuzzy_match (2.0.4)
64+
gh_inspector (1.1.3)
65+
httpclient (2.8.3)
66+
i18n (1.8.11)
67+
concurrent-ruby (~> 1.0)
68+
json (2.6.1)
69+
minitest (5.15.0)
70+
molinillo (0.8.0)
71+
nanaimo (0.3.0)
72+
nap (1.1.0)
73+
netrc (0.11.0)
74+
public_suffix (4.0.6)
75+
rexml (3.2.5)
76+
ruby-macho (2.5.1)
77+
typhoeus (1.4.0)
78+
ethon (>= 0.9.0)
79+
tzinfo (2.0.4)
80+
concurrent-ruby (~> 1.0)
81+
xcodeproj (1.21.0)
82+
CFPropertyList (>= 2.3.3, < 4.0)
83+
atomos (~> 0.1.3)
84+
claide (>= 1.0.2, < 2.0)
85+
colored2 (~> 3.1)
86+
nanaimo (~> 0.3.0)
87+
rexml (~> 3.2.4)
88+
zeitwerk (2.5.3)
89+
90+
PLATFORMS
91+
ruby
92+
93+
DEPENDENCIES
94+
cocoapods (~> 1.11, >= 1.11.2)
95+
96+
RUBY VERSION
97+
ruby 2.7.4p191
98+
99+
BUNDLED WITH
100+
2.2.27

template/android/app/_BUCK

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ android_library(
3535

3636
android_build_config(
3737
name = "build_config",
38-
package = "com.obytes",
38+
package = "com.obytesapp",
3939
)
4040

4141
android_resource(
4242
name = "res",
43-
package = "com.obytes",
43+
package = "com.obytesapp",
4444
res = "src/main/res",
4545
)
4646

template/android/app/build.gradle

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ import com.android.build.OutputFile
7878
*/
7979

8080
project.ext.react = [
81-
enableHermes: true, // clean and rebuild if changing
81+
enableHermes: false, // clean and rebuild if changing
8282
]
8383

8484
apply from: "../../node_modules/react-native/react.gradle"
@@ -114,30 +114,24 @@ def jscFlavor = 'org.webkit:android-jsc:+'
114114
/**
115115
* Whether to enable the Hermes VM.
116116
*
117-
* This should be set on project.ext.react and mirrored here. If it is not set
117+
* This should be set on project.ext.react and that value will be read here. If it is not set
118118
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119119
* and the benefits of using Hermes will therefore be sharply reduced.
120120
*/
121-
def enableHermes = project.ext.react.get("enableHermes", false);
121+
def enableHermes = project.ext.react.get("enableHermes", true);
122122

123123
/**
124124
* Architectures to build native code for in debug.
125125
*/
126126
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
127127

128-
129128
android {
130129
ndkVersion rootProject.ext.ndkVersion
131130

132131
compileSdkVersion rootProject.ext.compileSdkVersion
133132

134-
compileOptions {
135-
sourceCompatibility JavaVersion.VERSION_1_8
136-
targetCompatibility JavaVersion.VERSION_1_8
137-
}
138-
139133
defaultConfig {
140-
applicationId "com.obytes"
134+
applicationId "com.obytesapp"
141135
minSdkVersion rootProject.ext.minSdkVersion
142136
targetSdkVersion rootProject.ext.targetSdkVersion
143137
versionCode 1
@@ -199,8 +193,9 @@ dependencies {
199193
//noinspection GradleDynamicVersion
200194
implementation "com.facebook.react:react-native:+" // From node_modules
201195

202-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
196+
implementation "androidx.core:core-splashscreen:1.0.0-beta01" // splash screen config
203197

198+
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
204199

205200
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
206201
exclude group:'com.facebook.fbjni'

template/android/app/src/debug/java/com/obytes/ReactNativeFlipper.java renamed to template/android/app/src/debug/java/com/obytesapp/ReactNativeFlipper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
55
* directory of this source tree.
66
*/
7-
package com.obytes;
7+
package com.obytesapp;
88

99
import android.content.Context;
1010
import com.facebook.flipper.android.AndroidFlipperClient;

template/android/app/src/main/AndroidManifest.xml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.obytes">
2+
package="com.obytesapp">
33

44
<uses-permission android:name="android.permission.INTERNET" />
55

@@ -8,24 +8,17 @@
88
android:label="@string/app_name"
99
android:icon="@mipmap/ic_launcher"
1010
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
11+
android:theme="@style/BootTheme">
1212
<activity
1313
android:name=".MainActivity"
1414
android:label="@string/app_name"
1515
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
16+
android:launchMode="singleTask"
1617
android:windowSoftInputMode="adjustResize"
17-
android:exported="true"
18-
android:launchMode="singleTask">
19-
20-
</activity>
21-
<!-- add the following lines (use the theme you created at step 2) -->
22-
<activity
23-
android:name="com.zoontek.rnbootsplash.RNBootSplashActivity"
24-
android:theme="@style/BootTheme"
25-
android:launchMode="singleTask">
18+
android:exported="true">
2619
<intent-filter>
27-
<action android:name="android.intent.action.MAIN" />
28-
<category android:name="android.intent.category.LAUNCHER" />
20+
<action android:name="android.intent.action.MAIN" />
21+
<category android:name="android.intent.category.LAUNCHER" />
2922
</intent-filter>
3023
</activity>
3124
</application>

template/android/app/src/main/java/com/obytes/MainActivity.java

Lines changed: 0 additions & 24 deletions
This file was deleted.

template/android/app/src/main/java/com/obytes/ObytesJSIPackage.java

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.obytesapp;
2+
3+
import com.facebook.react.ReactActivity;
4+
import com.facebook.react.ReactActivityDelegate; // <- add this necessary import
5+
import com.zoontek.rnbootsplash.RNBootSplash; // <- add this necessary import
6+
7+
public class MainActivity extends ReactActivity {
8+
9+
/**
10+
* Returns the name of the main component registered from JavaScript. This is used to schedule
11+
* rendering of the component.
12+
*/
13+
@Override
14+
protected String getMainComponentName() {
15+
return "ObytesApp";
16+
}
17+
18+
@Override
19+
protected ReactActivityDelegate createReactActivityDelegate() {
20+
return new ReactActivityDelegate(this, getMainComponentName()) {
21+
22+
@Override
23+
protected void loadApp(String appKey) {
24+
RNBootSplash.init(MainActivity.this); // <- initialize the splash screen
25+
super.loadApp(appKey);
26+
}
27+
};
28+
}
29+
}

0 commit comments

Comments
 (0)