Skip to content

Commit 1049b4e

Browse files
authored
chore: bump example to React Native 0.64.0 (#131)
* Bump Example to React Native 0.64.0 * Bump xmldom resolution to 0.5.0 * Bump package versions * Keep library on React Native 0.62.2, because >0.62.2 requires iOS10+, but the library currently supports iOS9
1 parent 38f7f1f commit 1049b4e

File tree

27 files changed

+2664
-2685
lines changed

27 files changed

+2664
-2685
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ cd ios && pod install
3636
## Requirements
3737

3838
- Android >= 19
39-
- iOS >= 9
39+
- iOS >= 9 *Changing to iOS 10.x in July 2021*
4040
- Kotlin >= 1.4.x
4141

4242
## Usage
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="io.deckers.blob_courier">
2+
package="io.deckers.blob_courier"
3+
xmlns:tools="http://schemas.android.com/tools">
34

45
<uses-permission android:name="android.permission.INTERNET" />
56
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
67

8+
<uses-sdk tools:overrideLibrary="com.facebook.react" />
9+
710
<application android:usesCleartextTraffic="true" />
811

912
</manifest>

android/src/main/java/io/deckers/blob_courier/BlobCourierModule.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import com.facebook.react.bridge.ReactApplicationContext
1111
import com.facebook.react.bridge.ReactContextBaseJavaModule
1212
import com.facebook.react.bridge.ReactMethod
1313
import com.facebook.react.bridge.ReadableMap
14+
import com.facebook.react.module.annotations.ReactModule
1415
import com.facebook.react.modules.network.OkHttpClientProvider
1516
import io.deckers.blob_courier.cancel.CancellationParameterFactory
1617
import io.deckers.blob_courier.cancel.RequestCanceller
@@ -48,6 +49,7 @@ private fun le(m: String, e: Throwable? = null) = logger.e(m, e)
4849
private fun li(m: String) = logger.i(m)
4950
private fun lv(m: String, e: Throwable? = null) = logger.v(m, e)
5051

52+
@ReactModule(name=LIBRARY_NAME)
5153
class BlobCourierModule(private val reactContext: ReactApplicationContext) :
5254
ReactContextBaseJavaModule(reactContext) {
5355

example/android/app/build.gradle

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

121121
android {
122+
ndkVersion rootProject.ext.ndkVersion
123+
122124
compileSdkVersion rootProject.ext.compileSdkVersion
123125

124126
compileOptions {
@@ -170,7 +172,7 @@ android {
170172
def abi = output.getFilter(OutputFile.ABI)
171173
if (abi != null) { // null for the universal-debug, universal-release variants
172174
output.versionCodeOverride =
173-
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
175+
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
174176
}
175177

176178
}

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

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

Lines changed: 0 additions & 1 deletion
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/java/io/deckers/blob_courier_example/MainApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ private static void initializeFlipper(Context context, ReactInstanceManager reac
6363
We use reflection here to pick up the class that initializes Flipper,
6464
since Flipper library is not available in release mode
6565
*/
66-
Class<?> aClass = Class.forName("io.deckers.blob_courierExample.ReactNativeFlipper");
66+
Class<?> aClass = Class.forName("io.deckers.blob_courier_example.ReactNativeFlipper");
6767
aClass
6868
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
6969
.invoke(null, context, reactInstanceManager);

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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "29.0.2"
6-
minSdkVersion = 19
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.4")
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

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

0 commit comments

Comments
 (0)