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"
|
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 ARM devices
|
||||||
* - An APK that only works on x86 devices
|
* - An APK that only works on x86 devices
|
||||||
* The advantage is the size of the APK is reduced by about 4MB.
|
* 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.
|
* Run Proguard to shrink the Java bytecode in release builds.
|
||||||
*/
|
*/
|
||||||
def enableProguardInReleaseBuilds = true
|
def enableProguardInReleaseBuilds = false
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 23
|
||||||
buildToolsVersion "23.0.1"
|
buildToolsVersion "23.0.1"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "net.theorangeone.sphere"
|
applicationId "com.sphere"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 22
|
targetSdkVersion 22
|
||||||
versionCode 1
|
versionCode 1
|
||||||
|
@ -91,7 +92,7 @@ android {
|
||||||
splits {
|
splits {
|
||||||
abi {
|
abi {
|
||||||
enable enableSeparateBuildPerCPUArchitecture
|
enable enableSeparateBuildPerCPUArchitecture
|
||||||
universalApk false // Also generate an universal APK
|
universalApk false
|
||||||
reset()
|
reset()
|
||||||
include "armeabi-v7a", "x86"
|
include "armeabi-v7a", "x86"
|
||||||
}
|
}
|
||||||
|
@ -120,5 +121,5 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
compile fileTree(dir: "libs", include: ["*.jar"])
|
||||||
compile "com.android.support:appcompat-v7:23.0.1"
|
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 { *; }
|
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
|
||||||
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
|
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
|
||||||
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
|
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
|
||||||
-keepclassmembers class * { @com.facebook.react.uimanager.ReactProp <methods>; }
|
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
|
||||||
-keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup <methods>; }
|
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
|
||||||
|
|
||||||
-dontwarn com.facebook.react.**
|
-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": {
|
"dependencies": {
|
||||||
"immutable": "=3.7.6",
|
"immutable": "=3.7.6",
|
||||||
"react-native": "=0.19.0",
|
"react-native": "=0.20.0",
|
||||||
"react-native-busy-indicator": "=1.0.6",
|
"react-native-busy-indicator": "=1.0.6",
|
||||||
"react-native-modalbox": "=1.3.0",
|
"react-native-modalbox": "=1.3.0",
|
||||||
"react-native-side-menu": "=0.18.0",
|
"react-native-side-menu": "=0.18.0",
|
||||||
|
@ -23,9 +23,7 @@
|
||||||
"eslint-config": "git://github.com/oleous/eslint-config.git",
|
"eslint-config": "git://github.com/oleous/eslint-config.git",
|
||||||
"eslint-plugin-react": "=3.14.0",
|
"eslint-plugin-react": "=3.14.0",
|
||||||
"eslint-plugin-react-native": "=0.5.0",
|
"eslint-plugin-react-native": "=0.5.0",
|
||||||
"react": "=0.14.6",
|
"react": "=0.14.7",
|
||||||
"react-addons-test-utils": "=0.14.6",
|
"react-addons-test-utils": "=0.14.7"
|
||||||
"svg2png": "^3.0.0",
|
|
||||||
"url": "=0.11.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue