Skip to content

Commit d985466

Browse files
committed
downgraded react native due to unbuildable last version, new navigation, reducer provider with contextApi
1 parent b8311d7 commit d985466

File tree

181 files changed

+8471
-11373
lines changed

Some content is hidden

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

181 files changed

+8471
-11373
lines changed

.flowconfig

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ node_modules/warning/.*
2121
[include]
2222

2323
[libs]
24-
node_modules/react-native/interface.js
24+
node_modules/react-native/Libraries/react-native/react-native-interface.js
2525
node_modules/react-native/flow/
2626

2727
[options]
@@ -36,8 +36,9 @@ module.file_ext=.ios.js
3636

3737
munge_underscores=true
3838

39+
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
3940
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
40-
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
41+
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
4142

4243
suppress_type=$FlowIssue
4344
suppress_type=$FlowFixMe
@@ -71,4 +72,4 @@ untyped-import
7172
untyped-type-import
7273

7374
[version]
74-
^0.113.0
75+
^0.105.0

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ buck-out/
6363
/backend/activation.json
6464

6565
# environment config
66-
*.env
66+
*.env

LICENSE

-21
This file was deleted.

android/app/BUCK android/app/_BUCK

+2-2
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.rnapptvos_graphql",
38+
package = "com.rnapptvostest",
3939
)
4040

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

android/app/build.gradle

+3-27
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ import com.android.build.OutputFile
1515
* // the name of the generated asset file containing your JS bundle
1616
* bundleAssetName: "index.android.bundle",
1717
*
18-
* // the entry file for bundle generation. If none specified and
19-
* // "index.android.js" exists, it will be used. Otherwise "index.js" is
20-
* // default. Can be overridden with ENTRY_FILE environment variable.
18+
* // the entry file for bundle generation
2119
* entryFile: "index.android.js",
2220
*
2321
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
@@ -78,6 +76,7 @@ import com.android.build.OutputFile
7876
*/
7977

8078
project.ext.react = [
79+
entryFile: "index.js",
8180
enableHermes: false, // clean and rebuild if changing
8281
]
8382

@@ -129,7 +128,7 @@ android {
129128
}
130129

131130
defaultConfig {
132-
applicationId "com.rnapptvos_graphql"
131+
applicationId "com.rnapptvostest"
133132
minSdkVersion rootProject.ext.minSdkVersion
134133
targetSdkVersion rootProject.ext.targetSdkVersion
135134
versionCode 1
@@ -163,14 +162,6 @@ android {
163162
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
164163
}
165164
}
166-
167-
packagingOptions {
168-
pickFirst "lib/armeabi-v7a/libc++_shared.so"
169-
pickFirst "lib/arm64-v8a/libc++_shared.so"
170-
pickFirst "lib/x86/libc++_shared.so"
171-
pickFirst "lib/x86_64/libc++_shared.so"
172-
}
173-
174165
// applicationVariants are e.g. debug, release
175166
applicationVariants.all { variant ->
176167
variant.outputs.each { output ->
@@ -189,23 +180,8 @@ android {
189180

190181
dependencies {
191182
implementation fileTree(dir: "libs", include: ["*.jar"])
192-
//noinspection GradleDynamicVersion
193183
implementation "com.facebook.react:react-native:+" // From node_modules
194184

195-
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
196-
197-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
198-
exclude group:'com.facebook.fbjni'
199-
}
200-
201-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
202-
exclude group:'com.facebook.flipper'
203-
}
204-
205-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
206-
exclude group:'com.facebook.flipper'
207-
}
208-
209185
if (enableHermes) {
210186
def hermesPath = "../../node_modules/hermes-engine/android/";
211187
debugImplementation files(hermesPath + "hermes-debug.aar")

android/app/src/debug/java/com/rnapptvos_graphql/ReactNativeFlipper.java

-72
This file was deleted.

android/app/src/main/AndroidManifest.xml

+2-3
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.rnapptvos_graphql">
2+
package="com.rnapptvostest">
33

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

@@ -13,8 +13,7 @@
1313
<activity
1414
android:name=".MainActivity"
1515
android:label="@string/app_name"
16-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
17-
android:launchMode="singleTask"
16+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
1817
android:windowSoftInputMode="adjustResize">
1918
<intent-filter>
2019
<action android:name="android.intent.action.MAIN" />
68.7 KB
Binary file not shown.
64 KB
Binary file not shown.
13.1 KB
Binary file not shown.
56.9 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
306 KB
Binary file not shown.
55.6 KB
Binary file not shown.
110 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
27.7 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
25 KB
Binary file not shown.

android/app/src/main/java/com/rnapptvos_graphql/MainActivity.java android/app/src/main/java/com/rnapptvostest/MainActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.rnapptvos_graphql;
1+
package com.rnapptvostest;
22

33
import com.facebook.react.ReactActivity;
44

@@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
1010
*/
1111
@Override
1212
protected String getMainComponentName() {
13-
return "RNAppTVOS_GraphQL";
13+
return "RNAppTvOSTest";
1414
}
1515
}

android/app/src/main/java/com/rnapptvos_graphql/MainApplication.java android/app/src/main/java/com/rnapptvostest/MainApplication.java

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
package com.rnapptvos_graphql;
1+
package com.rnapptvostest;
22

33
import android.app.Application;
44
import android.content.Context;
55
import com.facebook.react.PackageList;
66
import com.facebook.react.ReactApplication;
7-
import com.facebook.react.ReactInstanceManager;
87
import com.facebook.react.ReactNativeHost;
98
import com.facebook.react.ReactPackage;
109
import com.facebook.soloader.SoLoader;
@@ -44,28 +43,23 @@ public ReactNativeHost getReactNativeHost() {
4443
public void onCreate() {
4544
super.onCreate();
4645
SoLoader.init(this, /* native exopackage */ false);
47-
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
46+
initializeFlipper(this); // Remove this line if you don't want Flipper enabled
4847
}
4948

5049
/**
51-
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
52-
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
50+
* Loads Flipper in React Native templates.
5351
*
5452
* @param context
55-
* @param reactInstanceManager
5653
*/
57-
private static void initializeFlipper(
58-
Context context, ReactInstanceManager reactInstanceManager) {
54+
private static void initializeFlipper(Context context) {
5955
if (BuildConfig.DEBUG) {
6056
try {
6157
/*
6258
We use reflection here to pick up the class that initializes Flipper,
6359
since Flipper library is not available in release mode
6460
*/
65-
Class<?> aClass = Class.forName("com.rnapptvos_graphql.ReactNativeFlipper");
66-
aClass
67-
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
68-
.invoke(null, context, reactInstanceManager);
61+
Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
62+
aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
6963
} catch (ClassNotFoundException e) {
7064
e.printStackTrace();
7165
} catch (NoSuchMethodException e) {
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">RNAppTVOS_GraphQL</string>
2+
<string name="app_name">RNAppTvOSTest</string>
33
</resources>

android/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
jcenter()
1313
}
1414
dependencies {
15-
classpath("com.android.tools.build:gradle:3.5.2")
15+
classpath("com.android.tools.build:gradle:3.4.2")
1616

1717
// NOTE: Do not place your application dependencies here; they belong
1818
// in the individual module build.gradle files
@@ -33,6 +33,6 @@ allprojects {
3333

3434
google()
3535
jcenter()
36-
maven { url 'https://www.jitpack.io' }
36+
maven { url 'https://jitpack.io' }
3737
}
3838
}

android/gradle.properties

-7
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,5 @@
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
1919

20-
# AndroidX package structure to make it clearer which packages are bundled with the
21-
# Android operating system, and which are packaged with your app's APK
22-
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2320
android.useAndroidX=true
24-
# Automatically convert third-party libraries to use AndroidX
2521
android.enableJetifier=true
26-
27-
# Version of flipper SDK to use with React Native
28-
FLIPPER_VERSION=0.33.1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

android/gradlew

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# you may not use this file except in compliance with the License.
88
# You may obtain a copy of the License at
99
#
10-
# https://www.apache.org/licenses/LICENSE-2.0
10+
# http://www.apache.org/licenses/LICENSE-2.0
1111
#
1212
# Unless required by applicable law or agreed to in writing, software
1313
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -125,8 +125,8 @@ if $darwin; then
125125
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126126
fi
127127

128-
# For Cygwin or MSYS, switch paths to Windows format before running java
129-
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
128+
# For Cygwin, switch paths to Windows format before running java
129+
if $cygwin ; then
130130
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131131
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132132
JAVACMD=`cygpath --unix "$JAVACMD"`

android/gradlew.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@rem you may not use this file except in compliance with the License.
66
@rem You may obtain a copy of the License at
77
@rem
8-
@rem https://www.apache.org/licenses/LICENSE-2.0
8+
@rem http://www.apache.org/licenses/LICENSE-2.0
99
@rem
1010
@rem Unless required by applicable law or agreed to in writing, software
1111
@rem distributed under the License is distributed on an "AS IS" BASIS,

android/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
rootProject.name = 'RNAppTVOS_GraphQL'
1+
rootProject.name = 'RNAppTvOSTest'
22
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
33
include ':app'

app.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "RNAppTVOS_GraphQL",
3-
"displayName": "RNAppTVOS_GraphQL"
2+
"name": "RNAppTvOSTest",
3+
"displayName": "RNAppTvOSTest"
44
}

babel.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@ module.exports = {
33
'module:metro-react-native-babel-preset',
44
'module:react-native-dotenv',
55
],
6+
plugins: [
7+
[
8+
'react-intl',
9+
{
10+
messagesDir: '/Users/catalinrizea/Sites/react-native-tvos-graphql/scripts/../src/i18n/translation/',
11+
extractSourceLocation: true,
12+
},
13+
],
14+
],
615
};

0 commit comments

Comments
 (0)