Upgrade to RN 0.20! 👍
This commit is contained in:
parent
501b9ae5d6
commit
dfd0b6a02b
4 changed files with 51 additions and 12 deletions
|
@ -60,7 +60,8 @@ import com.android.build.OutputFile
|
|||
apply from: "react.gradle"
|
||||
|
||||
/**
|
||||
* Set this to true to create two separate APKs instead of one:
|
||||
* Set this to true to create three separate APKs instead of one:
|
||||
* - A universal APK that works on all devices
|
||||
* - An APK that only works on ARM devices
|
||||
* - An APK that only works on x86 devices
|
||||
* The advantage is the size of the APK is reduced by about 4MB.
|
||||
|
@ -72,14 +73,14 @@ def enableSeparateBuildPerCPUArchitecture = false
|
|||
/**
|
||||
* Run Proguard to shrink the Java bytecode in release builds.
|
||||
*/
|
||||
def enableProguardInReleaseBuilds = true
|
||||
def enableProguardInReleaseBuilds = false
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion "23.0.1"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "net.theorangeone.sphere"
|
||||
applicationId "com.sphere"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 22
|
||||
versionCode 1
|
||||
|
@ -91,7 +92,7 @@ android {
|
|||
splits {
|
||||
abi {
|
||||
enable enableSeparateBuildPerCPUArchitecture
|
||||
universalApk false // Also generate an universal APK
|
||||
universalApk false
|
||||
reset()
|
||||
include "armeabi-v7a", "x86"
|
||||
}
|
||||
|
@ -120,5 +121,5 @@ android {
|
|||
dependencies {
|
||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
||||
compile "com.android.support:appcompat-v7:23.0.1"
|
||||
compile "com.facebook.react:react-native:0.19.+"
|
||||
compile "com.facebook.react:react-native:0.20.+"
|
||||
}
|
||||
|
|
4
android/app/proguard-rules.pro
vendored
4
android/app/proguard-rules.pro
vendored
|
@ -42,8 +42,8 @@
|
|||
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
|
||||
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
|
||||
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
|
||||
-keepclassmembers class * { @com.facebook.react.uimanager.ReactProp <methods>; }
|
||||
-keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup <methods>; }
|
||||
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
|
||||
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
|
||||
|
||||
-dontwarn com.facebook.react.**
|
||||
|
||||
|
|
40
android/app/src/main/java/com/sphere/MainActivity.java
Normal file
40
android/app/src/main/java/com/sphere/MainActivity.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package com.sphere;
|
||||
|
||||
import com.facebook.react.ReactActivity;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MainActivity extends ReactActivity {
|
||||
|
||||
/**
|
||||
* Returns the name of the main component registered from JavaScript.
|
||||
* This is used to schedule rendering of the component.
|
||||
*/
|
||||
@Override
|
||||
protected String getMainComponentName() {
|
||||
return "Sphere";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether dev mode should be enabled.
|
||||
* This enables e.g. the dev menu.
|
||||
*/
|
||||
@Override
|
||||
protected boolean getUseDeveloperSupport() {
|
||||
return BuildConfig.DEBUG;
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of packages used by the app. If the app uses additional views
|
||||
* or modules besides the default ones, add more packages here.
|
||||
*/
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
return Arrays.<ReactPackage>asList(
|
||||
new MainReactPackage()
|
||||
);
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"immutable": "=3.7.6",
|
||||
"react-native": "=0.19.0",
|
||||
"react-native": "=0.20.0",
|
||||
"react-native-busy-indicator": "=1.0.6",
|
||||
"react-native-modalbox": "=1.3.0",
|
||||
"react-native-side-menu": "=0.18.0",
|
||||
|
@ -23,9 +23,7 @@
|
|||
"eslint-config": "git://github.com/oleous/eslint-config.git",
|
||||
"eslint-plugin-react": "=3.14.0",
|
||||
"eslint-plugin-react-native": "=0.5.0",
|
||||
"react": "=0.14.6",
|
||||
"react-addons-test-utils": "=0.14.6",
|
||||
"svg2png": "^3.0.0",
|
||||
"url": "=0.11.0"
|
||||
"react": "=0.14.7",
|
||||
"react-addons-test-utils": "=0.14.7"
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue