Skip to content
This repository was archived by the owner on May 7, 2022. It is now read-only.

Commit f95413a

Browse files
committed
Update dependencies
1 parent dea51c0 commit f95413a

37 files changed

+3698
-4773
lines changed

android/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:4.1.2'
13-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}"
12+
classpath 'com.android.tools.build:gradle:4.2.1'
13+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.5.0')}"
1414
}
1515
}
1616

@@ -22,12 +22,12 @@ apply plugin: 'com.android.library'
2222
apply plugin: 'kotlin-android'
2323

2424
android {
25-
compileSdkVersion safeExtGet('compileSdkVersion', 29)
26-
buildToolsVersion safeExtGet('buildToolsVersion', '29.0.3')
25+
compileSdkVersion safeExtGet('compileSdkVersion', 30)
26+
buildToolsVersion safeExtGet('buildToolsVersion', '30.0.3')
2727

2828
defaultConfig {
2929
minSdkVersion safeExtGet('minSdkVersion', 16)
30-
targetSdkVersion safeExtGet('targetSdkVersion', 29)
30+
targetSdkVersion safeExtGet('targetSdkVersion', 30)
3131
}
3232
}
3333

@@ -38,7 +38,7 @@ repositories {
3838
}
3939

4040
dependencies {
41-
implementation "org.jetbrains.kotlin:kotlin-stdlib:${safeExtGet('kotlinVersion', '1.4.21')}"
41+
implementation "org.jetbrains.kotlin:kotlin-stdlib:${safeExtGet('kotlinVersion', '1.5.0')}"
4242
//noinspection GradleDynamicVersion
4343
implementation 'com.facebook.react:react-native:+'
4444
}

example/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files
2+
[*.bat]
3+
end_of_line = crlf

example/.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

example/.gitattributes

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

example/.gitignore

100755100644
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
project.xcworkspace
2423

2524
# Android/IntelliJ
2625
#
@@ -30,10 +29,6 @@ build/
3029
local.properties
3130
*.iml
3231

33-
# Visual Studio Code
34-
#
35-
.vscode/
36-
3732
# node.js
3833
#
3934
node_modules/

example/README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Example
1+
# example
22

33
## Getting Started
44

@@ -23,3 +23,23 @@ or
2323
```bash
2424
yarn android
2525
```
26+
27+
## Updating project
28+
29+
1. Remove current `example` project
30+
2. Create a project named `example` using [react-native-better-template](https://github.com/demchenkoalex/react-native-better-template)
31+
3. Revert `README.md` so you can see this guide
32+
4. In `tsconfig.json` add
33+
34+
```json
35+
"baseUrl": ".",
36+
"paths": {
37+
"@flyerhq/react-native-android-uri-path": ["../src"]
38+
},
39+
```
40+
41+
5. Check the difference in `metro.config.js` and combine all
42+
6. Revert `App.tsx`
43+
7. Check the difference in `settings.gradle` and combine all
44+
8. Check the difference in `android/app/build.gradle` and combine all
45+
9. Check the difference in `MainApplication.kt` and combine all

example/android/app/_BUCK

100755100644
File mode changed.

example/android/app/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
122122
def enableHermes = project.ext.react.get('enableHermes', false);
123123

124124
android {
125+
ndkVersion rootProject.ext.ndkVersion
126+
125127
compileSdkVersion rootProject.ext.compileSdkVersion
126128

127129
compileOptions {
@@ -170,11 +172,12 @@ android {
170172
variant.outputs.each { output ->
171173
// For each separate APK per architecture, set a unique version code as described here:
172174
// https://developer.android.com/studio/build/configure-apk-splits.html
175+
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
173176
def versionCodes = ['armeabi-v7a': 1, 'x86': 2, 'arm64-v8a': 3, 'x86_64': 4]
174177
def abi = output.getFilter(OutputFile.ABI)
175178
if (abi != null) { // null for the universal-debug, universal-release variants
176179
output.versionCodeOverride =
177-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
180+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
178181
}
179182

180183
}
@@ -183,6 +186,7 @@ android {
183186

184187
dependencies {
185188
implementation project(':react-native-android-uri-path')
189+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
186190
implementation fileTree(dir: 'libs', include: ['*.jar'])
187191
//noinspection GradleDynamicVersion
188192
implementation 'com.facebook.react:react-native:+' // From node_modules

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:tools="http://schemas.android.com/tools">
44

5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
5+
<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:ignore="GoogleAppIndexingWarning"
10+
tools:targetApi="28">
11+
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
12+
</application>
813
</manifest>

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

100755100644
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,5 @@
2121
<category android:name="android.intent.category.LAUNCHER" />
2222
</intent-filter>
2323
</activity>
24-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
2524
</application>
26-
2725
</manifest>

example/android/app/src/main/java/com/example/MainApplication.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class MainApplication : Application(), ReactApplication {
1616

1717
override fun getPackages(): List<ReactPackage> {
1818
val packages = PackageList(this).packages
19+
// Packages that cannot be autolinked yet can be added manually here, for example:
20+
// packages.add(MyReactNativePackage());
1921
packages.add(RNAndroidURIPathPackage())
2022
return packages
2123
}

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

100755100644
File mode changed.

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = '29.0.3'
6-
minSdkVersion = 16
7-
compileSdkVersion = 29
8-
targetSdkVersion = 29
9-
kotlinVersion = '1.4.21'
5+
buildToolsVersion = '30.0.3'
6+
minSdkVersion = 21
7+
compileSdkVersion = 30
8+
targetSdkVersion = 30
9+
kotlinVersion = '1.5.0'
10+
ndkVersion = '22.0.7026061'
1011
}
1112
repositories {
1213
google()
1314
jcenter()
1415
}
1516
dependencies {
16-
classpath 'com.android.tools.build:gradle:4.1.2'
17+
classpath 'com.android.tools.build:gradle:4.2.1'
1718
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
18-
1919
// NOTE: Do not place your application dependencies here; they belong
2020
// in the individual module build.gradle files
2121
}
@@ -35,6 +35,6 @@ allprojects {
3535

3636
google()
3737
jcenter()
38-
maven { url 'https://jitpack.io' }
38+
maven { url 'https://www.jitpack.io' }
3939
}
4040
}

example/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ android.useAndroidX=true
2525
android.enableJetifier=true
2626

2727
# Version of flipper SDK to use with React Native
28-
FLIPPER_VERSION=0.73.0
28+
FLIPPER_VERSION=0.87.0
508 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
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.8.1-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

example/android/gradlew

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ esac
8282

8383
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
8484

85+
8586
# Determine the Java command to use to start the JVM.
8687
if [ -n "$JAVA_HOME" ] ; then
8788
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -129,6 +130,7 @@ fi
129130
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
132134
JAVACMD=`cygpath --unix "$JAVACMD"`
133135

134136
# We build the pattern for arguments to be converted via cygpath

example/android/gradlew.bat

Lines changed: 5 additions & 19 deletions
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 http://www.apache.org/licenses/LICENSE-2.0
8+
@rem https://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,
@@ -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/android/settings.gradle

100755100644
File mode changed.

example/ios/Podfile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,19 @@ platform :ios, '10.0'
66
target 'example' 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
# Enables Flipper.
1216
#
1317
# Note that if you have use_frameworks! enabled, Flipper will not work and
14-
# you should disable these next few lines.
15-
use_flipper!({ 'Flipper' => '0.73.0' })
18+
# you should disable the next line.
19+
use_flipper!({ 'Flipper' => '0.87.0' })
20+
1621
post_install do |installer|
17-
flipper_post_install(installer)
22+
react_native_post_install(installer)
1823
end
1924
end

0 commit comments

Comments
 (0)