upgrade renatal, react-native, web3

Former-commit-id: 4c31f1225a
This commit is contained in:
Jarrad Hope 2016-03-06 23:09:55 +01:00
parent 3304099be6
commit 5db6709dd0
6 changed files with 28 additions and 20 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "Messenger", "name": "Messenger",
"interface": "om-next", "interface": "om-next",
"androidHost": "10.0.3.2", "androidHost": "localhost",
"modules": [ "modules": [
"react-native-contacts", "react-native-contacts",
"react-native-invertible-scroll-view", "react-native-invertible-scroll-view",
@ -10,5 +10,6 @@
], ],
"imageDirs": [ "imageDirs": [
"images" "images"
] ],
"iosHost": "localhost"
} }

View File

@ -26,7 +26,9 @@ import com.android.build.OutputFile
* *
* // whether to bundle JS and assets in another build variant (if configured). * // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property is in the format 'bundleIn${productFlavor}${buildType}' * // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true, * // bundleInFreeDebug: true,
* // bundleInPaidRelease: true, * // bundleInPaidRelease: true,
* // bundleInBeta: true, * // bundleInBeta: true,
@ -60,8 +62,7 @@ import com.android.build.OutputFile
apply from: "react.gradle" apply from: "react.gradle"
/** /**
* Set this to true to create three separate APKs instead of one: * Set this to true to create two 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.
@ -91,9 +92,9 @@ android {
} }
splits { splits {
abi { abi {
enable enableSeparateBuildPerCPUArchitecture
universalApk false
reset() reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86" include "armeabi-v7a", "x86"
} }
} }
@ -121,7 +122,7 @@ 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.20.+" compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-contacts') compile project(':react-native-contacts')
compile project(':react-native-i18n') compile project(':react-native-i18n')
compile(name:'geth', ext:'aar') compile(name:'geth', ext:'aar')

View File

@ -30,21 +30,20 @@ gradle.projectsEvaluated {
productFlavors.each { productFlavorName -> productFlavors.each { productFlavorName ->
buildTypes.each { buildTypeName -> buildTypes.each { buildTypeName ->
// Create variant and source names // Create variant and target names
def sourceName = "${buildTypeName}" def targetName = "${productFlavorName.capitalize()}${buildTypeName.capitalize()}"
def targetName = "${sourceName.capitalize()}" def targetPath = productFlavorName ?
if (productFlavorName) { "${productFlavorName}/${buildTypeName}" :
sourceName = "${productFlavorName}${targetName}" "${buildTypeName}"
}
// React js bundle directories // React js bundle directories
def jsBundleDirConfigName = "jsBundleDir${targetName}" def jsBundleDirConfigName = "jsBundleDir${targetName}"
def jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ?: def jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ?:
file("$buildDir/intermediates/assets/${sourceName}") file("$buildDir/intermediates/assets/${targetPath}")
def resourcesDirConfigName = "jsBundleDir${targetName}" def resourcesDirConfigName = "jsBundleDir${targetName}"
def resourcesDir = elvisFile(config."${resourcesDirConfigName}") ?: def resourcesDir = elvisFile(config."${resourcesDirConfigName}") ?:
file("$buildDir/intermediates/res/merged/${sourceName}") file("$buildDir/intermediates/res/merged/${targetPath}")
def jsBundleFile = file("$jsBundleDir/$bundleAssetName") def jsBundleFile = file("$jsBundleDir/$bundleAssetName")
// Bundle task name for variant // Bundle task name for variant
@ -80,7 +79,9 @@ gradle.projectsEvaluated {
"--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
} }
enabled config."bundleIn${targetName}" ?: targetName.toLowerCase().contains("release") enabled config."bundleIn${targetName}" ||
config."bundleIn${buildTypeName.capitalize()}" ?:
targetName.toLowerCase().contains("release")
} }
// Hook bundle${productFlavor}${buildType}JsAndAssets into the android build process // Hook bundle${productFlavor}${buildType}JsAndAssets into the android build process

View File

@ -16,6 +16,11 @@ allprojects {
repositories { repositories {
mavenLocal() mavenLocal()
jcenter() jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$projectDir/../../node_modules/react-native/android"
}
// for geth
flatDir { flatDir {
dirs 'libs' dirs 'libs'
} }

View File

@ -7,7 +7,7 @@
(enable-console-print!) (enable-console-print!)
(figwheel/watch-and-reload (figwheel/watch-and-reload
:websocket-url "ws://10.0.3.2:3449/figwheel-ws" :websocket-url "ws://localhost:3449/figwheel-ws"
:heads-up-display true :heads-up-display true
:jsload-callback #(om/add-root! state/reconciler core/AppRoot 1)) :jsload-callback #(om/add-root! state/reconciler core/AppRoot 1))

View File

@ -7,10 +7,10 @@
}, },
"dependencies": { "dependencies": {
"awesome-phonenumber": "^1.0.12", "awesome-phonenumber": "^1.0.12",
"react-native": "0.20.0", "react-native": "^0.21.0",
"react-native-contacts": "^0.2.1", "react-native-contacts": "^0.2.1",
"react-native-i18n": "0.0.8", "react-native-i18n": "0.0.8",
"react-native-invertible-scroll-view": "^0.2.0", "react-native-invertible-scroll-view": "^0.2.0",
"web3": "^0.15.2" "web3": "^0.15.3"
} }
} }