diff --git a/android/app/build.gradle b/android/app/build.gradle index eba45e0..5982743 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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.+" } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro index 3584026..7d72e46 100644 --- a/android/app/proguard-rules.pro +++ b/android/app/proguard-rules.pro @@ -42,8 +42,8 @@ -keep class * extends com.facebook.react.bridge.NativeModule { *; } -keepclassmembers,includedescriptorclasses class * { native ; } -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } --keepclassmembers class * { @com.facebook.react.uimanager.ReactProp ; } --keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup ; } +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } -dontwarn com.facebook.react.** diff --git a/android/app/src/main/java/com/sphere/MainActivity.java b/android/app/src/main/java/com/sphere/MainActivity.java new file mode 100644 index 0000000..82a8a15 --- /dev/null +++ b/android/app/src/main/java/com/sphere/MainActivity.java @@ -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 getPackages() { + return Arrays.asList( + new MainReactPackage() + ); + } +} diff --git a/package.json b/package.json index 1f1e4cb..2bdfdfd 100644 --- a/package.json +++ b/package.json @@ -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" } }