Skip to content

Commit

Permalink
Merge pull request react-native-camera#8 from react-native-community/…
Browse files Browse the repository at this point in the history
…master

update fork
  • Loading branch information
MateusAndrade authored Dec 26, 2019
2 parents 4075cdf + 44661fc commit ae687d0
Show file tree
Hide file tree
Showing 209 changed files with 23,624 additions and 3,708 deletions.
48 changes: 35 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ version: 2
executorType: docker
jobs:
build-app:
resource_class: large
resource_class: medium
environment:
- GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
- GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx3072m -XX:+HeapDumpOnOutOfMemoryError"'
- REACT_NATIVE_MAX_WORKERS: 2
- ANDROID_BUILD_TOOLS_VERSION: '28.0.3'
working_directory: ~/app
Expand All @@ -19,33 +19,55 @@ jobs:
- run:
name: Install Dependencies
command: yarn install --ignore-engines
- save_cache:
key: v1-npm
paths:
- node_modules/
- save_cache:
key: v1-npm-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- run:
name: Lint
command: yarn lint
- restore_cache:
keys:
- v1-gradle-{{ checksum "android/gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "examples/basic/android/gradle/wrapper/gradle-wrapper.properties" }}
- v1-gradle-wrapper
- restore_cache:
keys:
- v1-gradle-cache-{{ checksum "android/build.gradle" }}-{{ checksum "examples/basic/android/build.gradle" }}
- v1-gradle-cache
- run:
name: Run Checks
command: |
cd android
chmod +x ./gradlew && ./gradlew check
- store_artifacts:
path: android/build/reports
- run:
name: Run Yarn to Generate react.gradle
command: cd examples/basic/android && yarn
- run:
name: Build Sample App
command: |
cd examples/basic/android
yarn
chmod +x ./gradlew && ./gradlew build
cd examples/basic/android && chmod +x ./gradlew && ./gradlew build
- store_artifacts:
path: examples/basic/android/app/build/reports
destination: app
- save_cache:
key: v1-gradle-wrapper-{{ checksum "examples/basic/android/gradle/wrapper/gradle-wrapper.properties" }}
paths:
- ~/.gradle/wrapper
- save_cache:
key: v1-gradle-cache-{{ checksum "examples/basic/android/build.gradle" }}
paths:
- ~/.gradle/caches
- deploy:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
yarn ci:publish
fi
- save_cache:
key: v1-npm
paths:
- node_modules/
- save_cache:
key: v1-npm-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
deploy-docs:
working_directory: ~/app
docker:
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
circle.yml
commitlint.config.js
/android/build
/website
/docs
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# React Native Camera [![Backers on Open Collective](https://opencollective.com/react-native-camera/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/react-native-camera/sponsors/badge.svg)](#sponsors) [![npm version](https://badge.fury.io/js/react-native-camera.svg)](http://badge.fury.io/js/react-native-camera) [![npm downloads](https://img.shields.io/npm/dm/react-native-camera.svg)](https://www.npmjs.com/package/react-native-camera)

## Docs
Follow our docs here [https://react-native-community.github.io/react-native-camera/](https://react-native-community.github.io/react-native-camera/)

## Sponsors

If you use this library on your commercial/personal projects, you can help us by funding the work on specific issues that you choose by using IssueHunt.io!
Expand All @@ -8,6 +11,12 @@ This gives you the power to prioritize our work and support the project contribu

[![issuehunt-image](https://issuehunt.io/static/embed/issuehunt-button-v1.svg)](https://issuehunt.io/repos/33218414)

## react-native-camera for enterprise

Available as part of the Tidelift Subscription

The maintainers of react-native-camera and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-react-native-camera?utm_source=npm-react-native-camera&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)

## Open Collective

You can also fund this project using open collective
Expand Down Expand Up @@ -72,12 +81,6 @@ Supports:
- barcode scanning
- text recognition (optional installation for iOS using CocoaPods)

## Tidelift

[Get supported react-native-camera with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-react-native-camera?utm_source=npm-react-native-camera&utm_medium=referral&utm_campaign=readme)

![tidelift](https://tidelift.com/badges/github/react-native-community/react-native-camera)

### Example import

```jsx
Expand Down Expand Up @@ -122,7 +125,7 @@ To enable `video recording` feature you have to add the following code to the `A

2) On iOS, you must update Info.plist with a usage description for camera

```
```xml
...
<key>NSCameraUsageDescription</key>
<string>Your own description of the purpose</string>
Expand All @@ -132,3 +135,11 @@ To enable `video recording` feature you have to add the following code to the `A
For more information on installation, please refer to [installation requirements](./docs/installation.md#requirements).

For general introduction, please take a look into this [RNCamera](./docs/RNCamera.md).

## Security contact information

To report a security vulnerability, please use the

[Tidelift security contact](https://tidelift.com/security).

Tidelift will coordinate the fix and disclosure.
29 changes: 15 additions & 14 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ def safeExtGet(prop, fallback) {
}

buildscript {
repositories {
google()
maven {
url 'https://maven.google.com'
// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
// module dependency in an application project.
if (project == rootProject) {
repositories {
google()
jcenter()
}
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
dependencies {
//noinspection GradleDependency
classpath("com.android.tools.build:gradle:3.5.2")
}
}
}

Expand Down Expand Up @@ -64,9 +67,7 @@ android {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com'
}
mavenCentral()
maven { url "https://jitpack.io" }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
Expand All @@ -81,9 +82,9 @@ dependencies {
implementation "com.google.zxing:core:3.3.3"
implementation "com.drewnoakes:metadata-extractor:2.11.0"
generalImplementation "com.google.android.gms:play-services-vision:$googlePlayServicesVisionVersion"
implementation "com.android.support:exifinterface:${safeExtGet('supportLibVersion', '28.0.0')}"
implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '28.0.0')}"
implementation "com.android.support:support-v4:${safeExtGet('supportLibVersion', '28.0.0')}"
implementation "androidx.exifinterface:exifinterface:1.0.0"
implementation "androidx.annotation:annotation:1.0.0"
implementation "androidx.legacy:legacy-support-v4:1.0.0"
mlkitImplementation "com.google.firebase:firebase-ml-vision:${safeExtGet('firebase-ml-vision', '19.0.3')}"
mlkitImplementation "com.google.firebase:firebase-ml-vision-face-model:${safeExtGet('firebase-ml-vision-face-model', '17.0.2')}"
}
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
android.enableJetifier=true
android.useAndroidX=true
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Dec 31 13:43:56 BRST 2017
#Wed Jan 23 23:35:17 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.support.media.ExifInterface;
import androidx.exifinterface.media.ExifInterface;
import android.net.Uri;
import android.os.AsyncTask;
import android.util.Log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.v4.util.SparseArrayCompat;
import androidx.annotation.NonNull;
import androidx.collection.SparseArrayCompat;

/**
* Immutable class for describing proportional relationship between width and height.
Expand Down
Loading

0 comments on commit ae687d0

Please sign in to comment.