Skip to content

Commit 57cfd35

Browse files
committed
upgrade react-native
1 parent ab29f4e commit 57cfd35

Some content is hidden

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

48 files changed

+3437
-2295
lines changed

android/build.gradle

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
// original location:
1111
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
1212

13-
def DEFAULT_COMPILE_SDK_VERSION = 28
14-
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
13+
def DEFAULT_COMPILE_SDK_VERSION = 31
14+
def DEFAULT_BUILD_TOOLS_VERSION = '31.0.3'
1515
def DEFAULT_MIN_SDK_VERSION = 16
16-
def DEFAULT_TARGET_SDK_VERSION = 28
16+
def DEFAULT_TARGET_SDK_VERSION = 31
1717

1818
def safeExtGet(prop, fallback) {
1919
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
@@ -33,7 +33,7 @@ buildscript {
3333
jcenter()
3434
}
3535
dependencies {
36-
classpath 'com.android.tools.build:gradle:4.2.2'
36+
classpath("com.android.tools.build:gradle:7.1.1")
3737
}
3838
}
3939
}
@@ -146,3 +146,18 @@ afterEvaluate { project ->
146146
}
147147
}
148148
}
149+
150+
def myAttribute = Attribute.of("com.android.build.api.attributes.BuildTypeAttr", String)
151+
152+
dependencies.attributesSchema {
153+
// registers this attribute to the attributes schema
154+
attribute(myAttribute)
155+
}
156+
157+
configurations {
158+
implementation {
159+
attributes {
160+
attribute(myAttribute, "release")
161+
}
162+
}
163+
}

android/src/main/java/com/createthumbnail/CreateThumbnailModule.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ private static Bitmap getBitmapAtTime(Context context, String filePath, int time
189189
}
190190

191191
Bitmap image = retriever.getFrameAtTime(time * 1000, MediaMetadataRetriever.OPTION_CLOSEST_SYNC);
192-
retriever.release();
192+
try {
193+
retriever.release();
194+
} catch(IOException e) {
195+
e.printStackTrace();
196+
}
193197
if (image == null) {
194198
throw new IllegalStateException("File doesn't exist or not supported");
195199
}

example/.bundle/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

example/.editorconfig

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

example/.flowconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ node_modules/react-native/Libraries/polyfills/.*
1111
; Flow doesn't support platforms
1212
.*/Libraries/Utilities/LoadingView.js
1313

14+
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
15+
1416
[untyped]
1517
.*/node_modules/@react-native-community/cli/.*/.*
1618

@@ -50,7 +52,6 @@ nonstrict-import=warn
5052
deprecated-type=warn
5153
unsafe-getters-setters=warn
5254
unnecessary-invariant=warn
53-
signature-verification-failure=warn
5455

5556
[strict]
5657
deprecated-type
@@ -62,4 +63,4 @@ untyped-import
6263
untyped-type-import
6364

6465
[version]
65-
^0.158.0
66+
^0.176.3

example/.gitattributes

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

example/.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23+
ios/.xcode.env.local
2324

2425
# Android/IntelliJ
2526
#
@@ -49,12 +50,14 @@ buck-out/
4950
# For more information about the recommended setup visit:
5051
# https://docs.fastlane.tools/best-practices/source-control/
5152

52-
*/fastlane/report.xml
53-
*/fastlane/Preview.html
54-
*/fastlane/screenshots
53+
**/fastlane/report.xml
54+
**/fastlane/Preview.html
55+
**/fastlane/screenshots
56+
**/fastlane/test_output
5557

5658
# Bundle artifact
5759
*.jsbundle
5860

59-
# CocoaPods
61+
# Ruby / CocoaPods
6062
/ios/Pods/
63+
/vendor/bundle/

example/.prettierrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
24
bracketSpacing: false,
3-
jsxBracketSameLine: true,
45
singleQuote: true,
56
trailingComma: 'all',
6-
arrowParens: 'avoid',
77
};

example/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.7.5

example/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.5'
5+
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

0 commit comments

Comments
 (0)