Skip to content

Commit edc8518

Browse files
committed
fix(Android): Bump API to 29
1 parent 466f866 commit edc8518

File tree

27 files changed

+7130
-809
lines changed

27 files changed

+7130
-809
lines changed

android/build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@ buildscript {
2222
apply plugin: 'com.android.library'
2323
apply plugin: 'maven'
2424

25-
// Matches values in recent template from React Native 0.59 / 0.60
26-
// https://github.com/facebook/react-native/blob/0.59-stable/template/android/build.gradle#L5-L9
27-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L5-L9
28-
def DEFAULT_COMPILE_SDK_VERSION = 28
29-
def DEFAULT_BUILD_TOOLS_VERSION = "28.0.3"
25+
// Matches values in recent template from React Native 0.63
26+
// https://github.com/facebook/react-native/blob/0.63-stable/template/android/build.gradle#L5-L9
27+
def DEFAULT_COMPILE_SDK_VERSION = 29
28+
def DEFAULT_BUILD_TOOLS_VERSION = "29.0.2"
3029
def DEFAULT_MIN_SDK_VERSION = 21
31-
def DEFAULT_TARGET_SDK_VERSION = 28
30+
def DEFAULT_TARGET_SDK_VERSION = 29
3231

3332
android {
3433
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)

examples/tcpsockets/.flowconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ untyped-type-import=warn
5656
nonstrict-import=warn
5757
deprecated-type=warn
5858
unsafe-getters-setters=warn
59-
inexact-spread=warn
6059
unnecessary-invariant=warn
6160
signature-verification-failure=warn
6261
deprecated-utility=error
@@ -71,4 +70,4 @@ untyped-import
7170
untyped-type-import
7271

7372
[version]
74-
^0.113.0
73+
^0.122.0

examples/tcpsockets/.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# specific for windows script files
2-
*.bat text eol=crlf
1+
*.pbxproj -text

examples/tcpsockets/.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ local.properties
3434
node_modules/
3535
npm-debug.log
3636
yarn-error.log
37-
yarn.lock
38-
package-lock.json
3937

4038
# BUCK
4139
buck-out/
@@ -59,6 +57,3 @@ buck-out/
5957

6058
# CocoaPods
6159
/ios/Pods/
62-
63-
# TLS Cert
64-
*.pem
File renamed without changes.

examples/tcpsockets/android/app/build.gradle

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import com.android.build.OutputFile
2020
* // default. Can be overridden with ENTRY_FILE environment variable.
2121
* entryFile: "index.android.js",
2222
*
23-
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
23+
* // https://reactnative.dev/docs/performance#enable-the-ram-format
2424
* bundleCommand: "ram-bundle",
2525
*
2626
* // whether to bundle JS and assets in debug mode
@@ -157,20 +157,13 @@ android {
157157
}
158158
release {
159159
// Caution! In production, you need to generate your own keystore file.
160-
// see https://facebook.github.io/react-native/docs/signed-apk-android.
160+
// see https://reactnative.dev/docs/signed-apk-android.
161161
signingConfig signingConfigs.debug
162162
minifyEnabled enableProguardInReleaseBuilds
163163
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
164164
}
165165
}
166166

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-
174167
// applicationVariants are e.g. debug, release
175168
applicationVariants.all { variant ->
176169
variant.outputs.each { output ->
@@ -200,6 +193,7 @@ dependencies {
200193

201194
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
202195
exclude group:'com.facebook.flipper'
196+
exclude group:'com.squareup.okhttp3', module:'okhttp'
203197
}
204198

205199
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
@@ -222,4 +216,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
222216
into 'libs'
223217
}
224218

225-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
219+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

examples/tcpsockets/android/app/src/debug/java/com/tcpsockets/ReactNativeFlipper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
55
* directory of this source tree.
66
*/
7-
package com.rndiffapp;
7+
package com.tcpsockets;
88

99
import android.content.Context;
1010
import com.facebook.flipper.android.AndroidFlipperClient;

examples/tcpsockets/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
android:name=".MainActivity"
1515
android:label="@string/app_name"
1616
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
17-
android:launchMode="singleTask"
17+
android:launchMode="singleTask"
1818
android:windowSoftInputMode="adjustResize">
1919
<intent-filter>
2020
<action android:name="android.intent.action.MAIN" />

examples/tcpsockets/android/app/src/main/java/com/tcpsockets/MainApplication.java

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

examples/tcpsockets/android/build.gradle

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,17 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "28.0.3"
6-
minSdkVersion = 21
7-
compileSdkVersion = 28
8-
targetSdkVersion = 28
5+
buildToolsVersion = "29.0.2"
6+
minSdkVersion = 16
7+
compileSdkVersion = 29
8+
targetSdkVersion = 29
99
}
1010
repositories {
1111
google()
1212
jcenter()
1313
}
1414
dependencies {
15-
classpath("com.android.tools.build:gradle:3.5.2")
16-
15+
classpath("com.android.tools.build:gradle:3.5.3")
1716
// NOTE: Do not place your application dependencies here; they belong
1817
// in the individual module build.gradle files
1918
}

0 commit comments

Comments
 (0)