This commit is contained in:
Rodrigo Nascimento 2017-11-06 12:22:04 +00:00 committed by GitHub
commit 538b4cb5bf
22 changed files with 7720 additions and 1607 deletions

113
.circleci/config.yml Normal file
View File

@ -0,0 +1,113 @@
defaults: &defaults
working_directory: ~/repo
version: 2
jobs:
test:
<<: *defaults
docker:
- image: circleci/node:8
environment:
CODECOV_TOKEN: caa771ab-3d45-4756-8e2a-e1f25996fef6
steps:
- checkout
- run:
name: Install NPM modules
command: |
npm install
npm install codecov
- run:
name: Lint
command: |
npm run lint
- run:
name: Test
command: |
npm test
- run:
name: Codecov
command: |
npx codecov
build:
<<: *defaults
docker:
- image: circleci/android:api-26-alpha
environment:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"
JVM_OPTS: -Xmx2048m
TERM: dumb
BASH_ENV: "~/.nvm/nvm.sh"
steps:
- checkout
- run:
name: Install Node 8
command: |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 8
npm install
- restore_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "package.json" }}
- run:
name: Install NPM modules
command: |
npm install
- restore_cache:
key: android-{{ checksum ".circleci/config.yml" }}-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}
- run:
name: Install Android Depedencies
command: |
cd android
./gradlew androidDependencies
- run:
name: Build Android App
command: |
cd android
echo $KEYSTORE_BASE64 | base64 --decode > ./app/$KEYSTORE
echo -e "KEYSTORE=$KEYSTORE" > ./gradle.properties
echo -e "KEYSTORE_PASSWORD=$KEYSTORE_PASSWORD" >> ./gradle.properties
echo -e "KEY_ALIAS=$KEY_ALIAS" >> ./gradle.properties
echo -e "KEY_PASSWORD=$KEYSTORE_PASSWORD" >> ./gradle.properties
./gradlew assembleRelease
mkdir -p /tmp/build
mv app/build/outputs /tmp/build/
- store_artifacts:
path: /tmp/build/outputs
- save_cache:
key: node-modules-{{ checksum ".circleci/config.yml" }}-{{ checksum "package.json" }}
paths:
- ./node_modules
- save_cache:
key: android-{{ checksum ".circleci/config.yml" }}-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}
paths:
- ~/.gradle
workflows:
version: 2
build-and-test:
jobs:
- test
- build:
requires:
- test

View File

@ -45,12 +45,12 @@ android_library(
android_build_config( android_build_config(
name = "build_config", name = "build_config",
package = "com.rocketchatrn", package = "chat.rocket.reactnative",
) )
android_resource( android_resource(
name = "res", name = "res",
package = "com.rocketchatrn", package = "chat.rocket.reactnative",
res = "src/main/res", res = "src/main/res",
) )

View File

@ -94,7 +94,7 @@ android {
buildToolsVersion "25.0.1" buildToolsVersion "25.0.1"
defaultConfig { defaultConfig {
applicationId "com.rocketchatrn" applicationId "chat.rocket.reactnative"
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 22 targetSdkVersion 22
versionCode 1 versionCode 1
@ -105,11 +105,11 @@ android {
} }
signingConfigs { signingConfigs {
release { release {
if (project.hasProperty('ROCKETCHAT_RN_RELEASE_STORE_FILE')) { if (project.hasProperty('KEYSTORE')) {
storeFile file(ROCKETCHAT_RN_RELEASE_STORE_FILE) storeFile file(KEYSTORE)
storePassword ROCKETCHAT_RN_RELEASE_STORE_PASSWORD storePassword KEYSTORE_PASSWORD
keyAlias ROCKETCHAT_RN_RELEASE_KEY_ALIAS keyAlias KEY_ALIAS
keyPassword ROCKETCHAT_RN_RELEASE_KEY_PASSWORD keyPassword KEY_PASSWORD
} }
} }
} }

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rocketchatrn" package="chat.rocket.reactnative"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0"> android:versionName="1.0">

View File

@ -1,4 +1,4 @@
package com.rocketchatrn; package chat.rocket.reactnative;
import com.facebook.react.ReactActivity; import com.facebook.react.ReactActivity;

View File

@ -1,4 +1,4 @@
package com.rocketchatrn; package chat.rocket.reactnative;
import android.app.Application; import android.app.Application;

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

View File

@ -1,6 +1,3 @@
import 'babel-polyfill';
import 'regenerator-runtime/runtime';
import { createStore, applyMiddleware } from 'redux'; import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga'; import createSagaMiddleware from 'redux-saga';
import logger from 'redux-logger'; import logger from 'redux-logger';

View File

@ -1,5 +1,5 @@
// import 'babel-polyfill'; import 'babel-polyfill';
// import 'regenerator-runtime/runtime'; import 'regenerator-runtime/runtime';
import { AppRegistry } from 'react-native'; import { AppRegistry } from 'react-native';

View File

@ -1,5 +1,5 @@
// import 'babel-polyfill'; import 'babel-polyfill';
// import 'regenerator-runtime/runtime'; import 'regenerator-runtime/runtime';
import { AppRegistry } from 'react-native'; import { AppRegistry } from 'react-native';

View File

@ -5,6 +5,7 @@
}; };
objectVersion = 46; objectVersion = 46;
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; };
00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; };
@ -672,6 +673,7 @@
6533FB90166345D29F1B91C0 /* libRNFetchBlob.a */, 6533FB90166345D29F1B91C0 /* libRNFetchBlob.a */,
5A0EEFAF8AB14F5B9E796CDD /* libRNVectorIcons.a */, 5A0EEFAF8AB14F5B9E796CDD /* libRNVectorIcons.a */,
DA50CE47374C4C35BE6D9D58 /* libRNSVG.a */, DA50CE47374C4C35BE6D9D58 /* libRNSVG.a */,
3B696712EE2345A59F007A88 /* libRNImagePicker.a */,
); );
name = "Recovered References"; name = "Recovered References";
sourceTree = "<group>"; sourceTree = "<group>";
@ -800,6 +802,7 @@
TestTargetID = 13B07F861A680F5B00A75B9A; TestTargetID = 13B07F861A680F5B00A75B9A;
}; };
13B07F861A680F5B00A75B9A = { 13B07F861A680F5B00A75B9A = {
DevelopmentTeam = S6UPZG7ZR3;
ProvisioningStyle = Automatic; ProvisioningStyle = Automatic;
}; };
2D02E47A1E0B4A5D006451C7 = { 2D02E47A1E0B4A5D006451C7 = {
@ -1378,7 +1381,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO; DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = S6UPZG7ZR3;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(SRCROOT)/../node_modules/realm/src/**", "$(SRCROOT)/../node_modules/realm/src/**",
@ -1397,7 +1400,7 @@
"-ObjC", "-ObjC",
"-lc++", "-lc++",
); );
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative; PRODUCT_BUNDLE_IDENTIFIER = "chat.rocket.reactnative-chat.rocket.reactnative";
PRODUCT_NAME = RocketChatRN; PRODUCT_NAME = RocketChatRN;
PROVISIONING_PROFILE = ""; PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
@ -1411,7 +1414,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = S6UPZG7ZR3;
HEADER_SEARCH_PATHS = ( HEADER_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"$(SRCROOT)/../node_modules/realm/src/**", "$(SRCROOT)/../node_modules/realm/src/**",
@ -1430,7 +1433,7 @@
"-ObjC", "-ObjC",
"-lc++", "-lc++",
); );
PRODUCT_BUNDLE_IDENTIFIER = chat.rocket.reactnative; PRODUCT_BUNDLE_IDENTIFIER = "chat.rocket.reactnative-chat.rocket.reactnative";
PRODUCT_NAME = RocketChatRN; PRODUCT_NAME = RocketChatRN;
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0820" LastUpgradeVersion = "0900"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "NO" parallelizeBuildables = "NO"
@ -54,6 +54,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<Testables> <Testables>
<TestableReference <TestableReference
@ -83,6 +84,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0620" LastUpgradeVersion = "0900"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "NO" parallelizeBuildables = "NO"
@ -54,6 +54,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"> shouldUseLaunchSchemeArgsEnv = "YES">
<Testables> <Testables>
<TestableReference <TestableReference
@ -83,6 +84,7 @@
buildConfiguration = "Debug" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0" launchStyle = "0"
useCustomWorkingDirectory = "NO" useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO" ignoresPersistentStateOnLaunch = "NO"

View File

@ -143,6 +143,11 @@
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "icon-83.5@2x.png", "filename" : "icon-83.5@2x.png",
"scale" : "2x" "scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
} }
], ],
"info" : { "info" : {

View File

@ -9,7 +9,7 @@
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string> <string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>Rocket.Chat.$(PRODUCT_NAME:rfc1034identifier)</string> <string>chat.rocket.reactnative</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
@ -17,11 +17,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0</string> <string>0.1.0</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1</string> <string>2</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
@ -38,7 +38,7 @@
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>Upload images from camera</string> <string>Upload images from camera</string>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string/> <string></string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>Upload images from library</string> <string>Upload images from library</string>
<key>UIAppFonts</key> <key>UIAppFonts</key>

9142
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -69,5 +69,10 @@
"preset": "react-native", "preset": "react-native",
"coverageDirectory": "./coverage/", "coverageDirectory": "./coverage/",
"collectCoverage": true "collectCoverage": true
},
"engines": {
"node": ">=8.x",
"npm": ">=4.x",
"yarn": ">=0.21.3"
} }
} }