Skip to content

Commit

Permalink
Merge pull request #32 from negativetwelve/mark/package/instabug
Browse files Browse the repository at this point in the history
[Package] Add react-native-instabug-sdk + test + link on ios + android
  • Loading branch information
negativetwelve committed Aug 24, 2017
2 parents 3748f85 + 82f0990 commit 7943bbc
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 21 deletions.
7 changes: 7 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@ android {
compileSdkVersion 25
buildToolsVersion "25.0.2"

dexOptions {
javaMaxHeapSize "4g"
jumboMode true
}

defaultConfig {
applicationId "com.markmiyashita.showcase"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86"
}
Expand Down Expand Up @@ -68,6 +74,7 @@ android {

// These must be indented with 4 spaces for react-native link support.
dependencies {
compile project(':react-native-instabug-sdk')
compile project(':react-native-device-info')
compile project(':lottie-react-native')
compile project(':react-native-code-push')
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/java/com/rnshowcase/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.rninstabugsdk.rninstabugsdk.InstabugSDKPackage;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import com.brentvatne.react.ReactVideoPackage;
import com.rnuxcam.rnuxcam.UXCamPackage;
Expand Down Expand Up @@ -37,6 +38,7 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new InstabugSDKPackage(getApplicationContext()),
new RNDeviceInfo(),
new ReactVideoPackage(),
new UXCamPackage(),
Expand Down
2 changes: 2 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rootProject.name = 'RNShowcase'
include ':react-native-instabug-sdk'
project(':react-native-instabug-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-instabug-sdk/android')
include ':react-native-device-info'
project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')
include ':react-native-video'
Expand Down
4 changes: 4 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ target "RNShowcase" do
pod "lottie-ios", path: "../node_modules/lottie-ios"
pod "lottie-react-native", path: "../node_modules/lottie-react-native"
pod "react-native-heap-analytics", path: "../node_modules/react-native-heap-analytics"
pod "react-native-instabug-sdk", path: "../node_modules/react-native-instabug-sdk"
pod "react-native-intercom", path: "../node_modules/react-native-intercom"
pod "react-native-ux-cam", path: "../node_modules/react-native-ux-cam"
pod "react-native-video", path: "../node_modules/react-native-video"

# TODO(mark): These should be linked from the specific podspec.
pod "Instabug", "5.3.2"
end
19 changes: 14 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
PODS:
- Heap (4.0.0)
- Instabug (5.3.2)
- Intercom (3.2.11)
- lottie-ios (1.5.2)
- lottie-react-native (1.2.0):
- lottie-ios
- React
- React (0.47.1):
- React/Core (= 0.47.1)
- react-native-heap-analytics (1.3.0):
- react-native-heap-analytics (2.4.0):
- Heap (= 4.0.0)
- react-native-instabug-sdk (4.3.0):
- Instabug
- react-native-intercom (7.0.0):
- Intercom (> 3)
- react-native-ux-cam (3.5.0):
- react-native-ux-cam (4.4.0):
- UXCam (~> 2.5.8)
- react-native-video (1.1.0):
- React
Expand All @@ -27,9 +30,11 @@ PODS:
- Yoga (0.47.1.React)

DEPENDENCIES:
- Instabug (= 5.3.2)
- lottie-ios (from `../node_modules/lottie-ios`)
- lottie-react-native (from `../node_modules/lottie-react-native`)
- react-native-heap-analytics (from `../node_modules/react-native-heap-analytics`)
- react-native-instabug-sdk (from `../node_modules/react-native-instabug-sdk`)
- react-native-intercom (from `../node_modules/react-native-intercom`)
- react-native-ux-cam (from `../node_modules/react-native-ux-cam`)
- react-native-video (from `../node_modules/react-native-video`)
Expand All @@ -46,6 +51,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native"
react-native-heap-analytics:
:path: "../node_modules/react-native-heap-analytics"
react-native-instabug-sdk:
:path: "../node_modules/react-native-instabug-sdk"
react-native-intercom:
:path: "../node_modules/react-native-intercom"
react-native-ux-cam:
Expand All @@ -57,17 +64,19 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Heap: 9ef15407ea1893c3af40a13bb4f4a450ec8af142
Instabug: 035bf24475ffac1bcb81f8c542774487bc72f528
Intercom: 9d00ee218448d93abfce2eafe95c854d7c1f94a3
lottie-ios: 255a0e95973a5c4424e809d7a5c19f7384c73e84
lottie-react-native: ed02827c79d65cbc33a6bb03f222bef0770214b3
React: f705239a901cb3f95445c34468e5b37b6f80a0d4
react-native-heap-analytics: 04602941eb63776dddebb99507296ed814086ea3
react-native-heap-analytics: 414d8dc6532df0adedb2167fd1e161c24ba475a1
react-native-instabug-sdk: ebb15fab71db387f5dc1b99ba83c96c08e36096f
react-native-intercom: bb6bc4782b791b2a62ad33fda19a8b3394817ce4
react-native-ux-cam: 9af9a4c81d17d2f5e07694eab6e0de47240df0fe
react-native-ux-cam: 41101ca6c749096742748e37d617c2dd3cbcad06
react-native-video: 76a8ce72b4f93932eb9edb039b703d0ef71661f7
UXCam: 24fc9a228f2c749a7d56a97db205394af92e6a6b
Yoga: 13a12502dfabb4c75b914071dcb542af800deed4

PODFILE CHECKSUM: cf027ad19b3e6f97b58332bad83407607753df4e
PODFILE CHECKSUM: 07ddcd40fde4ebfe23b12b235a363fee249bd334

COCOAPODS: 1.2.1
2 changes: 2 additions & 0 deletions js/components/PackagesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {StyleSheet, View} from 'react-native';
import CodePushExample from '../examples/CodePushExample';
import DeviceInfoExample from '../examples/DeviceInfoExample';
import HeapAnalyticsExample from '../examples/HeapAnalyticsExample';
import InstabugExample from '../examples/InstabugExample';
import IntercomExample from '../examples/IntercomExample';
import LottieExample from '../examples/LottieExample';
import ShakeEventExample from '../examples/ShakeEventExample';
Expand All @@ -26,6 +27,7 @@ export default () => (
<CodePushExample />
<DeviceInfoExample />
<HeapAnalyticsExample />
<InstabugExample />
<IntercomExample />
<LottieExample />
<ShakeEventExample />
Expand Down
14 changes: 14 additions & 0 deletions js/examples/InstabugExample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Libraries
import React from 'react';
import Instabug from 'react-native-instabug-sdk';


export default class InstabugExample extends React.Component {
componentDidMount() {
// TODO(mark): Call instabug / add handlers.
}

render() {
return null;
}
}
14 changes: 14 additions & 0 deletions js/examples/__tests__/InstabugExample.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Libraries
import 'react-native';
import React from 'react';
import Renderer from 'react-test-renderer';

// Components
import InstabugExample from '../InstabugExample';


it('renders correctly', () => {
const tree = Renderer.create(
<InstabugExample />
);
});
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"react-native-code-push": "^5.0.0-beta",
"react-native-device-info": "^0.11.0",
"react-native-heap-analytics": "^2.4.0",
"react-native-instabug-sdk": "^4.3.0",
"react-native-intercom": "^7.0.0",
"react-native-shake-event": "^4.0.1",
"react-native-svg": "^5.4.1",
Expand All @@ -32,7 +33,7 @@
"coveralls": "^2.13.1",
"eslint-config-jolt": "^1.0.2",
"jest": "^20.0.4",
"jest-preset-jolt": "^1.0.1",
"jest-preset-jolt": "^2.0.0",
"nyc": "^11.1.0",
"react-test-renderer": "16.0.0-alpha.12"
},
Expand All @@ -45,7 +46,7 @@
"scripts": {
"coveralls": "cat ./coverage/lcov.info | coveralls",
"lint": "eslint js",
"start": "node node_modules/react-native/local-cli/cli.js start",
"start": "./node_modules/react-native/scripts/launchPackager.command",
"test": "jest",
"test:coverage": "jest --coverage"
}
Expand Down
34 changes: 20 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -773,15 +773,14 @@ babel-preset-jest@^20.0.3:
dependencies:
babel-plugin-jest-hoist "^20.0.3"

babel-preset-react-native@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-3.0.1.tgz#ad9e96e39eac6673f3382e9bea9d17c8aa95da3c"
babel-preset-react-native@^1.9.1:
version "1.9.2"
resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-1.9.2.tgz#b22addd2e355ff3b39671b79be807e52dfa145f2"
dependencies:
babel-plugin-check-es2015-constants "^6.5.0"
babel-plugin-react-transform "2.0.2"
babel-plugin-syntax-async-functions "^6.5.0"
babel-plugin-syntax-class-properties "^6.5.0"
babel-plugin-syntax-dynamic-import "^6.18.0"
babel-plugin-syntax-flow "^6.5.0"
babel-plugin-syntax-jsx "^6.5.0"
babel-plugin-syntax-trailing-function-commas "^6.5.0"
Expand All @@ -806,12 +805,11 @@ babel-preset-react-native@3.0.1:
babel-plugin-transform-react-jsx "^6.5.0"
babel-plugin-transform-react-jsx-source "^6.5.0"
babel-plugin-transform-regenerator "^6.5.0"
babel-template "^6.24.1"
react-transform-hmr "^1.0.4"

babel-preset-react-native@^1.9.1:
version "1.9.2"
resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-1.9.2.tgz#b22addd2e355ff3b39671b79be807e52dfa145f2"
babel-preset-react-native@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-2.1.0.tgz#9013ebd82da1c88102bf588810ff59e209ca2b8a"
dependencies:
babel-plugin-check-es2015-constants "^6.5.0"
babel-plugin-react-transform "2.0.2"
Expand Down Expand Up @@ -843,14 +841,15 @@ babel-preset-react-native@^1.9.1:
babel-plugin-transform-regenerator "^6.5.0"
react-transform-hmr "^1.0.4"

babel-preset-react-native@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-2.1.0.tgz#9013ebd82da1c88102bf588810ff59e209ca2b8a"
babel-preset-react-native@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/babel-preset-react-native/-/babel-preset-react-native-3.0.1.tgz#ad9e96e39eac6673f3382e9bea9d17c8aa95da3c"
dependencies:
babel-plugin-check-es2015-constants "^6.5.0"
babel-plugin-react-transform "2.0.2"
babel-plugin-syntax-async-functions "^6.5.0"
babel-plugin-syntax-class-properties "^6.5.0"
babel-plugin-syntax-dynamic-import "^6.18.0"
babel-plugin-syntax-flow "^6.5.0"
babel-plugin-syntax-jsx "^6.5.0"
babel-plugin-syntax-trailing-function-commas "^6.5.0"
Expand All @@ -875,6 +874,7 @@ babel-preset-react-native@^2.0.0:
babel-plugin-transform-react-jsx "^6.5.0"
babel-plugin-transform-react-jsx-source "^6.5.0"
babel-plugin-transform-regenerator "^6.5.0"
babel-template "^6.24.1"
react-transform-hmr "^1.0.4"

babel-register@^6.24.1, babel-register@^6.26.0:
Expand Down Expand Up @@ -2968,9 +2968,9 @@ jest-plugins@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/jest-plugins/-/jest-plugins-1.2.0.tgz#60269fa9d6eb8b338b30cd9e65d8488b6d9cbd5b"

jest-preset-jolt@^1.0.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/jest-preset-jolt/-/jest-preset-jolt-1.3.0.tgz#fb1e8ef5d38b2973495c2e83dd9f613d5a57561b"
jest-preset-jolt@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/jest-preset-jolt/-/jest-preset-jolt-2.0.0.tgz#c86f1be2c92208d56e15ac5dd9f7396e7a3ccb80"
dependencies:
jest-plugins "^1.2.0"
jest-plugins-recommended "^1.2.0"
Expand Down Expand Up @@ -4168,6 +4168,12 @@ react-native-heap-analytics@^2.4.0:
dependencies:
react-native-package "^2.5.0"

react-native-instabug-sdk@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/react-native-instabug-sdk/-/react-native-instabug-sdk-4.3.0.tgz#7391ca2c05a67ee5133a02aa435b93103afdac61"
dependencies:
react-native-package "^2.5.0"

react-native-intercom@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/react-native-intercom/-/react-native-intercom-7.0.0.tgz#7e90960e35492c14668ef12d94c47d46c5c5219c"
Expand Down

0 comments on commit 7943bbc

Please sign in to comment.