Skip to content

Commit 8d80a3b

Browse files
authored
Upgrade Dependencies (#2)
* chore: dependency updates and example to use RN 64 * fix: ios podspec set swift version
1 parent 9433cf5 commit 8d80a3b

28 files changed

+7086
-8194
lines changed

.editorconfig

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ end_of_line = lf
1313
charset = utf-8
1414
trim_trailing_whitespace = true
1515
insert_final_newline = true
16+
17+
# Windows files
18+
[*.bat]
19+
end_of_line = crlf

.gitattributes

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
*.pbxproj -text
2-
# specific for windows script files
1+
# Windows files should use crlf line endings
2+
# https://help.github.com/articles/dealing-with-line-endings/
33
*.bat text eol=crlf

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run lint && npm run typescript

android/build.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.2.1'
11+
classpath 'com.android.tools.build:gradle:4.1.0'
1212
// noinspection DifferentKotlinGradleVersion
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
@@ -28,8 +28,9 @@ def getExtOrIntegerDefault(name) {
2828
android {
2929
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
3030
buildToolsVersion getExtOrDefault('buildToolsVersion')
31+
ndkVersion getExtOrDefault('ndkVersion')
3132
defaultConfig {
32-
minSdkVersion 16
33+
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
3334
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
3435
versionCode 1
3536
versionName "1.0"

android/gradle.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
PasteInput_kotlinVersion=1.3.50
22
PasteInput_compileSdkVersion=29
3-
PasteInput_buildToolsVersion=29.0.2
3+
PasteInput_buildToolsVersion=29.0.3
44
PasteInput_targetSdkVersion=29
5+
PasteInput_ndkVersion = "20.1.5948944"

example/android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ android {
170170
def abi = output.getFilter(OutputFile.ABI)
171171
if (abi != null) { // null for the universal-debug, universal-release variants
172172
output.versionCodeOverride =
173-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
173+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
174174
}
175175

176176
}

example/android/app/src/debug/AndroidManifest.xml

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,10 @@
44

55
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
66

7-
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
7+
<application
8+
android:usesCleartextTraffic="true"
9+
tools:targetApi="28"
10+
tools:ignore="GoogleAppIndexingWarning">
11+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
12+
</application>
813
</manifest>

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

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
<category android:name="android.intent.category.LAUNCHER" />
2424
</intent-filter>
2525
</activity>
26-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
2726
</application>
2827

2928
</manifest>

example/android/app/src/main/res/values/styles.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<resources>
22

33
<!-- Base application theme. -->
4-
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
4+
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
55
<!-- Customize your theme here. -->
66
<item name="android:textColor">#000000</item>
77
</style>

example/android/build.gradle

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "29.0.2"
6-
minSdkVersion = 16
5+
buildToolsVersion = "29.0.3"
6+
minSdkVersion = 21
77
compileSdkVersion = 29
88
targetSdkVersion = 29
9+
ndkVersion = "20.1.5948944"
910
}
1011
repositories {
1112
google()
1213
jcenter()
1314
}
1415
dependencies {
15-
classpath("com.android.tools.build:gradle:3.5.3")
16+
classpath("com.android.tools.build:gradle:4.1.0")
1617

1718
// NOTE: Do not place your application dependencies here; they belong
1819
// in the individual module build.gradle files

example/android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
android.useAndroidX=true
2121
android.enableJetifier=true
22-
FLIPPER_VERSION=0.54.0
22+
FLIPPER_VERSION=0.75.1
Binary file not shown.
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.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

example/android/gradlew.bat

+4-18
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4040

4141
set JAVA_EXE=java.exe
4242
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto init
43+
if "%ERRORLEVEL%" == "0" goto execute
4444

4545
echo.
4646
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +54,7 @@ goto fail
5454
set JAVA_HOME=%JAVA_HOME:"=%
5555
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5656

57-
if exist "%JAVA_EXE%" goto init
57+
if exist "%JAVA_EXE%" goto execute
5858

5959
echo.
6060
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,28 +64,14 @@ echo location of your Java installation.
6464

6565
goto fail
6666

67-
:init
68-
@rem Get command-line arguments, handling Windows variants
69-
70-
if not "%OS%" == "Windows_NT" goto win9xME_args
71-
72-
:win9xME_args
73-
@rem Slurp the command line arguments.
74-
set CMD_LINE_ARGS=
75-
set _SKIP=2
76-
77-
:win9xME_args_slurp
78-
if "x%~1" == "x" goto execute
79-
80-
set CMD_LINE_ARGS=%*
81-
8267
:execute
8368
@rem Setup the command line
8469

8570
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
8671

72+
8773
@rem Execute Gradle
88-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
8975

9076
:end
9177
@rem End local scope for the variables with windows NT shell

example/ios/Podfile

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,20 @@ platform :ios, '10.0'
66
target 'ReactNativePasteInputExample' do
77
config = use_native_modules!
88

9-
use_react_native!(:path => config["reactNativePath"])
9+
use_react_native!(
10+
:path => config[:reactNativePath],
11+
# to enable hermes on iOS, change `false` to `true` and then install pods
12+
:hermes_enabled => false
13+
)
1014

1115
pod 'react-native-paste-input', :path => '../..'
1216

1317
# Enables Flipper.
1418
#
1519
# Note that if you have use_frameworks! enabled, Flipper will not work and
1620
# you should disable these next few lines.
17-
use_flipper!
21+
use_flipper!()
1822
post_install do |installer|
19-
flipper_post_install(installer)
23+
react_native_post_install(installer)
2024
end
2125
end

0 commit comments

Comments
 (0)