Skip to content

Commit

Permalink
Merge branch 'master' into issue_18316
Browse files Browse the repository at this point in the history
  • Loading branch information
shenyute committed Jan 27, 2019
2 parents 0b36381 + 842b9c1 commit 6f32df0
Show file tree
Hide file tree
Showing 545 changed files with 13,168 additions and 5,847 deletions.
12 changes: 6 additions & 6 deletions .appveyor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ environment:
ANDROID_HOME: "C:\\android-sdk-windows"
ANDROID_NDK: "C:\\android-sdk-windows\\android-ndk-r17c"
ANDROID_BUILD_VERSION: 28
ANDROID_TOOLS_VERSION: 28.0.2
ANDROID_TOOLS_VERSION: 28.0.3

GRADLE_OPTS: -Dorg.gradle.daemon=false

Expand All @@ -21,11 +21,11 @@ install:
- set PATH=%PATH%;"%ANDROID_HOME%\tools\bin"

- yes 2> nul | sdkmanager --licenses > nul
- sdkmanager "system-images;android-19;google_apis;armeabi-v7a"
- sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
- sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
- sdkmanager "add-ons;addon-google_apis-google-23"
- sdkmanager "extras;android;m2repository"
- yes 2> nul | sdkmanager "system-images;android-19;google_apis;armeabi-v7a"
- yes 2> nul | sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
- yes 2> nul | sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
- yes 2> nul | sdkmanager "add-ons;addon-google_apis-google-23"
- yes 2> nul | sdkmanager "extras;android;m2repository"

- appveyor DownloadFile "%NDK_TOOLS_URL%" -FileName "%TMP%/ndk.zip"
- 7z x "%TMP%/ndk.zip" -o"%ANDROID_HOME%" > nul
Expand Down
98 changes: 6 additions & 92 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ aliases:
- node_modules
key: v1-analysis-dependencies-{{ arch }}-{{ checksum "package.json" }}{{ checksum "bots/package.json" }}

- &restore-cache-android-packages
keys:
- v1-android-sdkmanager-packages-api-28-alpha-{{ checksum "scripts/.tests.env" }}
- &save-cache-android-packages
paths:
- /opt/android/sdk
key: v1-android-sdkmanager-packages-api-28-alpha-{{ checksum "scripts/.tests.env" }}

- &restore-cache-gradle
keys:
- v1-gradle-{{ .Branch }}-{{ checksum "build.gradle" }}-{{ checksum "ReactAndroid/build.gradle" }}
Expand All @@ -47,23 +39,15 @@ aliases:
- ~/.gradle
key: v1-gradle-{{ .Branch }}-{{ checksum "build.gradle" }}-{{ checksum "ReactAndroid/build.gradle" }}

- &restore-cache-ndk
keys:
- v3-android-ndk-r17c-{{ checksum "scripts/android-setup.sh" }}
- &save-cache-ndk
paths:
- /opt/ndk
key: v3-android-ndk-r17c-{{ checksum "scripts/android-setup.sh" }}

- &restore-cache-downloads-buck
keys:
- v3-buck-v2018.10.29.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
- v3-buck-v2018.10.29.01-
- v3-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}}
- v3-buck-v2019.01.10.01-
- &save-cache-downloads-buck
paths:
- ~/buck
- ~/okbuck
key: v3-buck-v2018.10.29.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}
key: v3-buck-v2019.01.10.01-{{ checksum "scripts/circleci/buck_fetch.sh" }}

- &restore-cache-watchman
keys:
Expand Down Expand Up @@ -115,11 +99,6 @@ aliases:
- /.*-stable/
- gh-pages

# Dependency Management
- &install-ndk
name: Install Android NDK
command: source scripts/android-setup.sh && getAndroidNDK

- &yarn
name: Run Yarn
command: |
Expand All @@ -129,52 +108,16 @@ aliases:
yarn install --non-interactive --cache-folder ~/.cache/yarn
fi
- &install-yarn
name: Install Yarn
command: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
- &install-buck
name: Install BUCK
command: |
if [[ ! -e ~/buck ]]; then
git clone https://github.com/facebook/buck.git ~/buck --branch v2018.10.29.01 --depth=1
fi
cd ~/buck && ant
buck --version
# Install related tooling
if [[ ! -e ~/okbuck ]]; then
git clone https://github.com/uber/okbuck.git ~/okbuck --depth=1
fi
mkdir -p ~/react-native/tooling/junit
cp -R ~/okbuck/tooling/junit/* ~/react-native/tooling/junit/.
- &create-ndk-directory
name: Create Android NDK Directory
command: |
if [[ ! -e /opt/ndk ]]; then
sudo mkdir /opt/ndk
fi
sudo chown ${USER:=$(/usr/bin/id -run)}:$USER /opt/ndk
# CircleCI does not support interpolating env variables in the environment
# https://circleci.com/docs/2.0/env-vars/#interpolating-environment-variables-to-set-other-environment-variables
- &configure-android-path
name: Configure Environment Variables
command: |
echo 'export PATH=${ANDROID_NDK}:~/buck/bin:$PATH' >> $BASH_ENV
source $BASH_ENV
- &install-android-packages
name: Install Android SDK Packages
command: source scripts/android-setup.sh && getAndroidPackages

- &install-android-build-dependencies
name: Install Android Build Dependencies
command: ./scripts/circleci/apt-get-android-deps.sh

- &validate-android-sdk
name: Validate Android SDK Install
command: ./scripts/validate-android-sdk.sh
Expand Down Expand Up @@ -248,7 +191,7 @@ aliases:

- &compile-native-libs
name: Compile Native Libs for Unit and Integration Tests
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS -Pcom.android.build.threadPoolSize=1
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS
no_output_timeout: 6m

- &run-android-unit-tests
Expand All @@ -265,7 +208,7 @@ aliases:
- &build-android-rntester-app
name: Build Android RNTester App
command: ./gradlew RNTester:android:app:assembleRelease -Pjobs=$BUILD_THREADS
command: ./gradlew RNTester:android:app:assembleRelease

- &collect-android-test-results
name: Collect Test Results
Expand Down Expand Up @@ -340,14 +283,13 @@ js_defaults: &js_defaults
android_defaults: &android_defaults
<<: *defaults
docker:
- image: circleci/android:api-28-node8-alpha
- image: reactnativecommunity/react-native-android
resource_class: "large"
environment:
- TERM: "dumb"
- ADB_INSTALL_TIMEOUT: 10
- _JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
- GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+HeapDumpOnOutOfMemoryError"'
- ANDROID_NDK: '/opt/ndk/android-ndk-r17c'
- BUILD_THREADS: 2

macos_defaults: &macos_defaults
Expand Down Expand Up @@ -472,15 +414,6 @@ jobs:
- attach_workspace:
at: ~/react-native

# Configure Android SDK and related dependencies
- run: *configure-android-path
# Android build deps install from the network faster than cache
- run: *install-android-build-dependencies

- restore-cache: *restore-cache-android-packages
- run: *install-android-packages
- save-cache: *save-cache-android-packages

# Validate Android SDK installation and packages
- run: *validate-android-sdk

Expand All @@ -490,12 +423,6 @@ jobs:

# Keep configuring Android dependencies while AVD boots up

# Install Android NDK
- run: *create-ndk-directory
- restore-cache: *restore-cache-ndk
- run: *install-ndk
- save-cache: *save-cache-ndk

# Install Buck
- restore-cache: *restore-cache-downloads-buck
- run: *install-buck
Expand Down Expand Up @@ -623,21 +550,8 @@ jobs:
- restore-cache: *restore-yarn-cache
- run: *yarn

# Configure Android SDK and related dependencies
- run: *configure-android-path
- run: *install-android-build-dependencies

- restore-cache: *restore-cache-android-packages
- run: *install-android-packages

# Install Android NDK
- run: *create-ndk-directory
- restore-cache: *restore-cache-ndk
- run: *install-ndk

# Fetch dependencies using Buck
- restore-cache: *restore-cache-downloads-buck
- run: *install-buck
- run: *download-dependencies-buck

# Fetch dependencies using Gradle
Expand Down
6 changes: 5 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
; require from fbjs/lib instead: require('fbjs/lib/warning')
.*/node_modules/warning/.*

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
Expand Down Expand Up @@ -85,6 +88,7 @@ sketchy-null-mixed=warn
# This is noisy for now. We *do* still want to warn on importing types
# from untyped files, which is covered by untyped-type-import
untyped-import=off
deprecated-utility=error

[strict]
deprecated-type
Expand All @@ -96,4 +100,4 @@ untyped-import
untyped-type-import

[version]
^0.89.0
^0.92.0
6 changes: 5 additions & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
; require from fbjs/lib instead: require('fbjs/lib/warning')
.*/node_modules/warning/.*

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
Expand Down Expand Up @@ -85,6 +88,7 @@ sketchy-null-mixed=warn
# This is noisy for now. We *do* still want to warn on importing types
# from untyped files, which is covered by untyped-type-import
untyped-import=off
deprecated-utility=error

[strict]
deprecated-type
Expand All @@ -96,4 +100,4 @@ untyped-import
untyped-type-import

[version]
^0.89.0
^0.92.0
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
GitHub Issues in the `facebook/react-native` repository are used exclusively for tracking bugs in React Native.
👉 Please follow one of these issue templates:
- https://github.com/facebook/react-native/issues/new/choose

Please take a look at the issue templates at https://github.com/facebook/react-native/issues/new/choose before submitting a new issue. Following one of the issue templates will ensure maintainers can route your request efficiently. Thanks!
Note: to keep the backlog clean and actionable, issues may be immediately closed if they do not follow one of the above issue templates.
32 changes: 23 additions & 9 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
---
name: 🐛 Bug Report
about: Report a reproducible bug or regression in the core React Native library.
name: I want to report an issue with React Native.
about: You want to report a reproducible bug or regression in React Native.
labels: "Bug Report"
---

<!-- Requirements: please go through this checklist before opening a new issue -->
- [ ] Review the documentation: https://facebook.github.io/react-native
- [ ] Search for existing issues: https://github.com/facebook/react-native/issues
- [ ] Use the latest React Native release: https://github.com/facebook/react-native/releases
<!--
If you are looking for help, please review the documentation or ask a question on Stack Overflow:
- https://facebook.github.io/react-native
- https://stackoverflow.com/questions/tagged/react-native
If you want to report a problem with React Native itself, please fill out the template.
If you would like to report an issue in the documentation, or anything related to the React Native
website, please visit https://github.com/facebook/react-native-website/issues.
-->

## Environment
Run `react-native info` in your terminal and paste its contents here.
<!-- Run `react-native info` in your terminal and paste its contents here. -->

## Description
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
<!--
Describe your issue in detail. Include screenshots if needed. If this is a regression, let us know.
-->

## Reproducible Demo
Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve
<!--
Let us know how to reproduce the issue. Include a code sample, share a project,
or share an app that reproduces the issue using https://snack.expo.io/.
Please follow the guidelines for providing a minimal example: https://stackoverflow.com/help/mcve.
-->
21 changes: 4 additions & 17 deletions .github/ISSUE_TEMPLATE/discussion.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
---
name: 🗣 Start a Discussion
about: Use https://github.com/react-native-community/discussions-and-proposals to propose changes or discuss feature requests.
title: [Discussion]
labels: "For Discussion"
name: I want to discuss or propose a change to React Native.
about: You have an idea that could make React Native better, or you want to discuss some aspect of the framework.
---

Use https://github.com/react-native-community/discussions-and-proposals to propose changes or discuss feature requests. This helps us ensure bug reports and regressions are given the priority they require.

You may also use https://discuss.reactjs.org/ for discussions on topics that are not necessarily served by the Bug Report template.

---

# For Discussion

<!--
If you feel strongly about having your discussion in the main React Native repository, you may write your proposal here.
Please note that there is a high probability your issue will be closed by a maintainer, who may kindly ask you to move the discussion elsewhere.
-->
The React Native community has set up a separate repository to track discussions and proposals:
- https://github.com/react-native-community/discussions-and-proposals
11 changes: 6 additions & 5 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
name: 📖 Documentation Issue
about: Report issues with the docs at https://github.com/facebook/react-native-website/issues.
name: I found a problem with the documentation.
about: You want to report something that is wrong or missing from the documentation.
labels: "🚫Docs"
---

GitHub Issues in the `facebook/react-native` repository are used exclusively for tracking bugs in React Native.

If you would like to report an issue in the React Native documentation, or anything related to the React Native website, please visit https://github.com/facebook/react-native-website/issues.
The React Native website is hosted on a separate repository. You may let the
team know about any issues with the documentation by opening an issue there:
- https://github.com/facebook/react-native-website
- https://github.com/facebook/react-native-website/issues
21 changes: 5 additions & 16 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
---
name: 💬 Question
about: If you need help with your React Native app, the right place to go depends on the type of help that you need.
name: I need help using React Native.
about: You need help writing your React Native app.
labels: "Question"
---

GitHub Issues in the `facebook/react-native` repository are used exclusively for tracking bugs in React Native. GitHub may not be the ideal place to ask questions about using React Native, but we have compiled a list of resources that should help.

### Get help with your React Native app or ask code-level questions

Many members of the community use Stack Overflow to ask questions.
GitHub Issues in the `facebook/react-native` repository are used exclusively for tracking bugs
in the React Native framework. Please do not submit support requests through GitHub.

Many members of the community use Stack Overflow to ask questions:
* Read through the existing questions tagged with **react-native**:
http://stackoverflow.com/questions/tagged/react-native

* Ask your own:
http://stackoverflow.com/questions/ask?tags=react-native

### Talk about best practices or propose changes to React Native

For longer-form conversations about React Native, we’ve set up a discussion forum:
https://discuss.reactjs.org

This forum is a great place for discussion about best practices and application architecture as well as the future of React Native.

### Chat with React and React Native community members

If you need an answer right away, check out the Reactiflux Discord community at https://discord.gg/0ZcbPKXt5bZjGY5n. There are usually a number of React Native experts there who can help out or point you to somewhere you might want to look.
Loading

0 comments on commit 6f32df0

Please sign in to comment.