Skip to content

Commit 680d3fb

Browse files
author
Christopher J. Brody
committed
Updates for React Native 0.59 vs 0.60 on Android
ref: #29
1 parent 2ffaf81 commit 680d3fb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

templates/android.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ module.exports = platform => [{
1919
apply plugin: 'com.android.library'
2020
apply plugin: 'maven'
2121
22-
// Matches values in recent template from React Native (0.59)
22+
// Matches values in recent template from React Native 0.59 / 0.60
2323
// https://github.com/facebook/react-native/blob/0.59-stable/template/android/build.gradle#L5-L9
24+
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L5-L9
2425
def DEFAULT_COMPILE_SDK_VERSION = 28
2526
def DEFAULT_BUILD_TOOLS_VERSION = "28.0.3"
2627
def DEFAULT_MIN_SDK_VERSION = 16
@@ -44,8 +45,9 @@ android {
4445
repositories {
4546
maven {
4647
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
47-
// Matches recent template from React Native (0.59)
48+
// Matches recent template from React Native 0.59 / 0.60
4849
// https://github.com/facebook/react-native/blob/0.59-stable/template/android/build.gradle#L30
50+
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L28
4951
url "$projectDir/../node_modules/react-native/android"
5052
}
5153
mavenCentral()
@@ -179,7 +181,10 @@ public class ${name}Module extends ReactContextBaseJavaModule {
179181
180182
import android.view.View;
181183
184+
// AppCompatCheckBox import for React Native pre-0.60:
182185
import android.support.v7.widget.AppCompatCheckBox;
186+
// AppCompatCheckBox import for React Native 0.60(+):
187+
// import androidx.appcompat.widget.AppCompatCheckBox;
183188
184189
import com.facebook.react.uimanager.SimpleViewManager;
185190
import com.facebook.react.uimanager.ThemedReactContext;

0 commit comments

Comments
 (0)