Skip to content

Commit

Permalink
Migrate to RN 0.59.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rasom committed Apr 1, 2019
1 parent 76c2ad2 commit 24a978d
Show file tree
Hide file tree
Showing 40 changed files with 1,477 additions and 1,912 deletions.
6 changes: 4 additions & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[options]
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

module.system=haste

esproposal.class_static_fields=enable
Expand Down Expand Up @@ -65,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

[version]
^0.63.0
^0.92.0
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ fastlane/README.md
/VERSION
/package-lock.json
/package.json
/metro.config.js
/yarn.lock
/.re-natal
/re-natal
Expand Down
17 changes: 2 additions & 15 deletions android/app/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,8 @@ import re
#

lib_deps = []
for jarfile in glob(['libs/*.jar']):
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
lib_deps.append(':' + name)
prebuilt_jar(
name = name,
binary_jar = jarfile,
)

for aarfile in glob(['libs/*.aar']):
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
lib_deps.append(':' + name)
android_prebuilt_aar(
name = name,
aar = aarfile,
)
create_aar_targets(glob(["libs/*.aar"]))
create_jar_targets(glob(["libs/*.jar"]))

android_library(
name = 'all-libs',
Expand Down
24 changes: 13 additions & 11 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apply plugin: "com.android.application"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"

import com.android.build.OutputFile
import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy

/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
Expand Down Expand Up @@ -74,7 +75,7 @@ import com.android.build.OutputFile
* ]
*/
project.ext.react = [
nodeExecutableAndArgs: ["node", "--max-old-space-size=8192"],
nodeExecutableAndArgs: ["node", "--max-old-space-size=16384"],
entryFile: "index.android.js"
]

Expand Down Expand Up @@ -133,18 +134,23 @@ def getEnvOrConfig = { varName ->

android {
compileSdkVersion 28
buildToolsVersion "28.0.3"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}



defaultConfig {
applicationId "im.status.ethereum"
minSdkVersion 23
targetSdkVersion 26
targetSdkVersion 28
multiDexEnabled true
versionCode getVersionCode()
versionName getVersionName()
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86"
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86-64"
}
}
/**
Expand Down Expand Up @@ -209,7 +215,7 @@ android {
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86-64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
Expand Down Expand Up @@ -257,7 +263,7 @@ dependencies {
}
compile (project(':react-native-camera')) {
exclude group: "com.google.android.gms"
compile 'com.android.support:exifinterface:27.+'
compile 'com.android.support:exifinterface:28.+'
}
implementation project(':react-native-status-keycard')
implementation 'com.google.firebase:firebase-core:16.0.3' //this decides your firebase SDK version
Expand All @@ -266,15 +272,11 @@ dependencies {

compile 'com.github.status-im:function:0.0.1'
implementation fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"])
compile 'com.facebook.fresco:animated-gif:1.9.0'
implementation 'com.facebook.fresco:animated-gif:1.10.0'
}

// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}

task hemroidBuild(type: Exec) {
def rootDir = project.rootDir
Expand Down
Binary file removed android/app/libs/google-services-4.1.0.jar
Binary file not shown.
Binary file removed android/app/libs/gradle-download-task-3.1.2.jar
Binary file not shown.
8 changes: 8 additions & 0 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
</manifest>
8 changes: 8 additions & 0 deletions android/app/src/debug/res/xml/react_native_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain>
<domain includeSubdomains="true">10.0.3.2</domain>
<domain includeSubdomains="true">10.0.2.2</domain>
</domain-config>
</network-security-config>
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
android:name=".MainApplication"
android:largeHeap="true">
android:largeHeap="true"
android:usesCleartextTraffic="true">
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
Expand Down
29 changes: 27 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
repositories {
flatDir { dirs "libs", "${rootDir}/app/libs" }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:4.1.0'
classpath 'com.android.tools.build:gradle:3.3.2'
// google-services downgraded from 4.1.0 because of
// https://github.com/invertase/react-native-firebase/issues/766#issuecomment-365116012
classpath 'com.google.gms:google-services:4.0.1'
classpath 'de.undercouch:gradle-download-task:3.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

subprojects {
afterEvaluate {
if (project.hasProperty("android")) {
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
targetSdkVersion 28
}
}
}
}
}

allprojects {
repositories {
mavenLocal()
Expand All @@ -28,3 +52,4 @@ allprojects {
maven { url "https://jitpack.io" }
}
}

4 changes: 0 additions & 4 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

android.useDeprecatedNdk=true
# To create a new keystore for development purposes (https://developer.android.com/studio/publish/app-signing.html)
# $keytool -genkey -v -keystore ./status-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias status
STATUS_RELEASE_STORE_FILE=~/.gradle/status-im.keystore
STATUS_RELEASE_STORE_PASSWORD=password
STATUS_RELEASE_KEY_ALIAS=status
STATUS_RELEASE_KEY_PASSWORD=password

# Workaround for issue https://github.com/facebook/react-native/issues/16906 (TODO: fixed in 0.57.3, remove once we upgrade react-native)
android.enableAapt2=false

org.gradle.jvmargs=-Xmx8704M
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
78 changes: 43 additions & 35 deletions android/gradlew
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand All @@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -40,31 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
Expand All @@ -90,7 +89,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand All @@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"
Loading

0 comments on commit 24a978d

Please sign in to comment.