merged develop branch
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
[android]
|
||||||
|
target = Google Inc.:Google APIs:23
|
||||||
|
|
||||||
|
[maven_repositories]
|
||||||
|
central = https://repo1.maven.org/maven2
|
43
.flowconfig
|
@ -15,11 +15,8 @@
|
||||||
# Ignore react and fbjs where there are overlaps, but don't ignore
|
# Ignore react and fbjs where there are overlaps, but don't ignore
|
||||||
# anything that react-native relies on
|
# anything that react-native relies on
|
||||||
.*/node_modules/fbjs/lib/Map.js
|
.*/node_modules/fbjs/lib/Map.js
|
||||||
.*/node_modules/fbjs/lib/Promise.js
|
|
||||||
.*/node_modules/fbjs/lib/fetch.js
|
.*/node_modules/fbjs/lib/fetch.js
|
||||||
.*/node_modules/fbjs/lib/ExecutionEnvironment.js
|
.*/node_modules/fbjs/lib/ExecutionEnvironment.js
|
||||||
.*/node_modules/fbjs/lib/isEmpty.js
|
|
||||||
.*/node_modules/fbjs/lib/crc32.js
|
|
||||||
.*/node_modules/fbjs/lib/ErrorUtils.js
|
.*/node_modules/fbjs/lib/ErrorUtils.js
|
||||||
|
|
||||||
# Flow has a built-in definition for the 'react' module which we prefer to use
|
# Flow has a built-in definition for the 'react' module which we prefer to use
|
||||||
|
@ -28,6 +25,11 @@
|
||||||
.*/node_modules/react/lib/React.js
|
.*/node_modules/react/lib/React.js
|
||||||
.*/node_modules/react/lib/ReactDOM.js
|
.*/node_modules/react/lib/ReactDOM.js
|
||||||
|
|
||||||
|
.*/__mocks__/.*
|
||||||
|
.*/__tests__/.*
|
||||||
|
|
||||||
|
.*/commoner/test/source/widget/share.js
|
||||||
|
|
||||||
# Ignore commoner tests
|
# Ignore commoner tests
|
||||||
.*/node_modules/commoner/test/.*
|
.*/node_modules/commoner/test/.*
|
||||||
|
|
||||||
|
@ -40,14 +42,43 @@
|
||||||
# Ignore Website
|
# Ignore Website
|
||||||
.*/website/.*
|
.*/website/.*
|
||||||
|
|
||||||
|
# Ignore generators
|
||||||
|
.*/local-cli/generator.*
|
||||||
|
|
||||||
|
# Ignore BUCK generated folders
|
||||||
|
.*\.buckd/
|
||||||
|
|
||||||
|
.*/node_modules/is-my-json-valid/test/.*\.json
|
||||||
|
.*/node_modules/iconv-lite/encodings/tables/.*\.json
|
||||||
|
.*/node_modules/y18n/test/.*\.json
|
||||||
|
.*/node_modules/spdx-license-ids/spdx-license-ids.json
|
||||||
|
.*/node_modules/spdx-exceptions/index.json
|
||||||
|
.*/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json
|
||||||
|
.*/node_modules/resolve/lib/core.json
|
||||||
|
.*/node_modules/jsonparse/samplejson/.*\.json
|
||||||
|
.*/node_modules/json5/test/.*\.json
|
||||||
|
.*/node_modules/ua-parser-js/test/.*\.json
|
||||||
|
.*/node_modules/builtin-modules/builtin-modules.json
|
||||||
|
.*/node_modules/binary-extensions/binary-extensions.json
|
||||||
|
.*/node_modules/url-regex/tlds.json
|
||||||
|
.*/node_modules/joi/.*\.json
|
||||||
|
.*/node_modules/isemail/.*\.json
|
||||||
|
.*/node_modules/tr46/.*\.json
|
||||||
|
|
||||||
|
|
||||||
[include]
|
[include]
|
||||||
|
|
||||||
[libs]
|
[libs]
|
||||||
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
||||||
|
node_modules/react-native/flow
|
||||||
|
flow/
|
||||||
|
|
||||||
[options]
|
[options]
|
||||||
module.system=haste
|
module.system=haste
|
||||||
|
|
||||||
|
esproposal.class_static_fields=enable
|
||||||
|
esproposal.class_instance_fields=enable
|
||||||
|
|
||||||
munge_underscores=true
|
munge_underscores=true
|
||||||
|
|
||||||
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
|
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
|
||||||
|
@ -57,9 +88,9 @@ suppress_type=$FlowIssue
|
||||||
suppress_type=$FlowFixMe
|
suppress_type=$FlowFixMe
|
||||||
suppress_type=$FixMe
|
suppress_type=$FixMe
|
||||||
|
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-1]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-2]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-1]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-2]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||||
|
|
||||||
[version]
|
[version]
|
||||||
0.21.0
|
^0.22.0
|
||||||
|
|
|
@ -27,12 +27,19 @@ project.xcworkspace
|
||||||
.idea
|
.idea
|
||||||
.gradle
|
.gradle
|
||||||
local.properties
|
local.properties
|
||||||
|
syng-im.iml
|
||||||
|
|
||||||
# node.js
|
# node.js
|
||||||
#
|
#
|
||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
|
# BUCK
|
||||||
|
buck-out/
|
||||||
|
\.buckd/
|
||||||
|
android/app/libs
|
||||||
|
android/keystores/debug.keystore
|
||||||
|
|
||||||
# Generated by re-natal
|
# Generated by re-natal
|
||||||
#
|
#
|
||||||
index.android.js
|
index.android.js
|
||||||
|
@ -41,4 +48,5 @@ target/
|
||||||
|
|
||||||
# Figwheel
|
# Figwheel
|
||||||
#
|
#
|
||||||
figwheel_server.log
|
figwheel_server.log
|
||||||
|
.nrepl-port
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
"react-native-action-button",
|
"react-native-action-button",
|
||||||
"react-native-vector-icons/Ionicons",
|
"react-native-vector-icons/Ionicons",
|
||||||
"react-native-circle-checkbox",
|
"react-native-circle-checkbox",
|
||||||
"react-native-randombytes"
|
"react-native-randombytes",
|
||||||
|
"dismissKeyboard"
|
||||||
],
|
],
|
||||||
"imageDirs": [
|
"imageDirs": [
|
||||||
"images"
|
"images"
|
||||||
|
|
43
README.md
|
@ -4,33 +4,34 @@ A Clojure library designed to ... well, that part is up to you.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
- install syng-lib/protocol in lein
|
### Requirements
|
||||||
|
- [Node & NPM](https://nodejs.org/en/)
|
||||||
|
- [Lein](http://leiningen.org)
|
||||||
|
- [react-native](https://facebook.github.io/react-native/docs/getting-started.html) - npm install -g react-native
|
||||||
|
- [re-natal](https://github.com/drapanjanas/re-natal) - npm install -g re-natal
|
||||||
|
- [Latest JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
|
||||||
|
- Android SDK [Mac](brew install android-sdk) or [Windows/Linux](https://developer.android.com/sdk/installing/index.html)
|
||||||
|
- [Genymotion](https://www.genymotion.com) (optinal, you may use an AVD - Android Virtual Device)
|
||||||
|
- Status lib - git clone git@github.com:status-im/status-lib.git && cd status-lib/protocol && lein install
|
||||||
|
- [Setup Android Development Environment / Simulator](https://facebook.github.io/react-native/docs/android-setup.html)
|
||||||
|
|
||||||
#### Linux:
|
|
||||||
|
|
||||||
optional: $ npm upgrade -g re-natal
|
### Run the app
|
||||||
|
|
||||||
optional: $ re-natal upgrade
|
re-natal deps
|
||||||
|
re-natal use-android-device genymotion (or avd)
|
||||||
|
re-natal use-figwheel
|
||||||
|
lein figwheel android
|
||||||
|
|
||||||
$ re-natal deps
|
# new tab
|
||||||
|
react-native start
|
||||||
|
|
||||||
$ re-natal use-android-device <real|genymotion|avd>
|
# new tab
|
||||||
|
adb reverse tcp:8081 tcp:8081
|
||||||
|
adb reverse tcp:3449 tcp:3449
|
||||||
|
react-native run-android
|
||||||
|
|
||||||
$ re-natal use-figwheel
|
>>>>>>> origin/develop
|
||||||
|
|
||||||
$ lein figwheel android
|
|
||||||
|
|
||||||
- new terminal(only for linux)
|
|
||||||
|
|
||||||
$ react-native start
|
|
||||||
|
|
||||||
- new terminal
|
|
||||||
|
|
||||||
$ adb reverse tcp:8081 tcp:8081
|
|
||||||
|
|
||||||
$ adb reverse tcp:3449 tcp:3449
|
|
||||||
|
|
||||||
$ react-native run-android
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
import re
|
||||||
|
|
||||||
|
# To learn about Buck see [Docs](https://buckbuild.com/).
|
||||||
|
# To run your application with Buck:
|
||||||
|
# - install Buck
|
||||||
|
# - `npm start` - to start the packager
|
||||||
|
# - `cd android`
|
||||||
|
# - `cp ~/.android/debug.keystore keystores/debug.keystore`
|
||||||
|
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
|
||||||
|
# - `buck install -r android/app` - compile, install and run application
|
||||||
|
#
|
||||||
|
|
||||||
|
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,
|
||||||
|
)
|
||||||
|
|
||||||
|
android_library(
|
||||||
|
name = 'all-libs',
|
||||||
|
exported_deps = lib_deps
|
||||||
|
)
|
||||||
|
|
||||||
|
android_library(
|
||||||
|
name = 'app-code',
|
||||||
|
srcs = glob([
|
||||||
|
'src/main/java/**/*.java',
|
||||||
|
]),
|
||||||
|
deps = [
|
||||||
|
':all-libs',
|
||||||
|
':build_config',
|
||||||
|
':res',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
android_build_config(
|
||||||
|
name = 'build_config',
|
||||||
|
package = 'com.syngim',
|
||||||
|
)
|
||||||
|
|
||||||
|
android_resource(
|
||||||
|
name = 'res',
|
||||||
|
res = 'src/main/res',
|
||||||
|
package = 'com.syngim',
|
||||||
|
)
|
||||||
|
|
||||||
|
android_binary(
|
||||||
|
name = 'app',
|
||||||
|
package_type = 'debug',
|
||||||
|
manifest = 'src/main/AndroidManifest.xml',
|
||||||
|
keystore = '//android/keystores:debug',
|
||||||
|
deps = [
|
||||||
|
':app-code',
|
||||||
|
],
|
||||||
|
)
|
|
@ -9,7 +9,7 @@ import com.android.build.OutputFile
|
||||||
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
||||||
* bundle directly from the development server. Below you can see all the possible configurations
|
* bundle directly from the development server. Below you can see all the possible configurations
|
||||||
* and their defaults. If you decide to add a configuration block, make sure to add it before the
|
* and their defaults. If you decide to add a configuration block, make sure to add it before the
|
||||||
* `apply from: "react.gradle"` line.
|
* `apply from: "../../node_modules/react-native/react.gradle"` line.
|
||||||
*
|
*
|
||||||
* project.ext.react = [
|
* project.ext.react = [
|
||||||
* // the name of the generated asset file containing your JS bundle
|
* // the name of the generated asset file containing your JS bundle
|
||||||
|
@ -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,
|
||||||
|
@ -57,11 +59,10 @@ import com.android.build.OutputFile
|
||||||
* ]
|
* ]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
apply from: "react.gradle"
|
apply from: "../../node_modules/react-native/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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,3 +133,9 @@ dependencies {
|
||||||
|
|
||||||
compile fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"])
|
compile fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"])
|
||||||
}
|
}
|
||||||
|
// 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'
|
||||||
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
|
android:windowSoftInputMode="adjustResize"
|
||||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
|
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
After Width: | Height: | Size: 177 B |
After Width: | Height: | Size: 394 B |
After Width: | Height: | Size: 293 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 509 B |
After Width: | Height: | Size: 235 B |
After Width: | Height: | Size: 256 B |
After Width: | Height: | Size: 430 B |
After Width: | Height: | Size: 314 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 165 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 650 B |
After Width: | Height: | Size: 684 B |
After Width: | Height: | Size: 354 B |
After Width: | Height: | Size: 945 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 315 B |
After Width: | Height: | Size: 147 B |
After Width: | Height: | Size: 267 B |
After Width: | Height: | Size: 225 B |
After Width: | Height: | Size: 314 B |
After Width: | Height: | Size: 293 B |
After Width: | Height: | Size: 126 B |
After Width: | Height: | Size: 122 B |
After Width: | Height: | Size: 262 B |
After Width: | Height: | Size: 209 B |
After Width: | Height: | Size: 868 B |
After Width: | Height: | Size: 123 B |
After Width: | Height: | Size: 829 B |
After Width: | Height: | Size: 302 B |
After Width: | Height: | Size: 234 B |
After Width: | Height: | Size: 234 B |
After Width: | Height: | Size: 460 B |
After Width: | Height: | Size: 474 B |
After Width: | Height: | Size: 252 B |
After Width: | Height: | Size: 520 B |
After Width: | Height: | Size: 704 B |
After Width: | Height: | Size: 243 B |
After Width: | Height: | Size: 202 B |
After Width: | Height: | Size: 375 B |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 621 B |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 209 B |
After Width: | Height: | Size: 216 B |
After Width: | Height: | Size: 530 B |
After Width: | Height: | Size: 381 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 206 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 343 B |
After Width: | Height: | Size: 343 B |
After Width: | Height: | Size: 989 B |
After Width: | Height: | Size: 881 B |
After Width: | Height: | Size: 438 B |
After Width: | Height: | Size: 969 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 296 B |
After Width: | Height: | Size: 552 B |
After Width: | Height: | Size: 520 B |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 886 B |
After Width: | Height: | Size: 366 B |
After Width: | Height: | Size: 375 B |
After Width: | Height: | Size: 766 B |
After Width: | Height: | Size: 536 B |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 299 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 788 B |
After Width: | Height: | Size: 470 B |
After Width: | Height: | Size: 470 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 676 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 518 B |
After Width: | Height: | Size: 362 B |
After Width: | Height: | Size: 763 B |
After Width: | Height: | Size: 739 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 452 B |
After Width: | Height: | Size: 487 B |
After Width: | Height: | Size: 1.0 KiB |