Skip to content

Commit

Permalink
[verifier] Upgrade to RN 61 (#1572)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvol committed Nov 5, 2019
1 parent 154953f commit 4593664
Show file tree
Hide file tree
Showing 18 changed files with 454 additions and 247 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import mock from '@react-native-community/async-storage/jest/async-storage-mock'

export default mock
65 changes: 46 additions & 19 deletions packages/verifier/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ import com.android.build.OutputFile

project.ext.react = [
entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing
extraPackagerArgs: ["--max-workers=2"],
bundleInIntegration: true,
devDisabledInIntegration: true,
Expand All @@ -89,7 +90,7 @@ project.ext.envConfigFiles = [
]

apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
apply from: "../../node_modules/react-native/react.gradle"
apply from: "./react.gradle"

/**
* Set this to true to create two separate APKs instead of one:
Expand All @@ -108,6 +109,30 @@ def enableProguardInReleaseBuilds = true

def appVersionCode = Integer.valueOf(System.env.CIRCLE_BUILD_NUM ?: VERSION_CODE)


/**
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/**
* Whether to enable the Hermes VM.
*
* This should be set on project.ext.react and mirrored here. If it is not set
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/

def enableHermes = project.ext.react.get("enableHermes", false);


android {
compileSdkVersion rootProject.ext.compileSdkVersion

Expand Down Expand Up @@ -145,10 +170,12 @@ android {
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}

buildTypes {
debug {
applicationIdSuffix ".debug"
multiDexEnabled true
signingConfig signingConfigs.debug
}

integration {
Expand Down Expand Up @@ -193,32 +220,30 @@ android {
}

dependencies {
implementation project(':@react-native-community_netinfo')
implementation project(':react-native-gesture-handler')
implementation project(':@segment_analytics-react-native-firebase')
implementation project(':@segment_analytics-react-native')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation project(':react-native-languages')
implementation project(':react-native-firebase')
implementation project(':react-native-fs')
implementation project(':react-native-svg')
implementation project(':react-native-config')
implementation project(':react-native-restart-android')
implementation project(':react-native-splash-screen')
implementation project(':react-native-device-info')

implementation 'com.google.code.gson:gson:2.8.2'
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.google.firebase:firebase-messaging:17.6.0'
implementation 'com.google.firebase:firebase-database:16.1.0'
implementation 'com.google.firebase:firebase-auth:16.2.1'
// implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation platform("com.google.firebase:firebase-bom:22.2.0")
implementation 'com.google.android.gms:play-services-base'
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-database'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-storage'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.12.0'
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.android.support:support-v4:23.0.0'



if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}

// Run this once to be able to run the application with BUCK
Expand All @@ -229,3 +254,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
}

apply plugin: 'com.google.gms.google-services'

apply from: file("../../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
Loading

0 comments on commit 4593664

Please sign in to comment.