Skip to content

Commit abbd887

Browse files
author
Krzysztof Borowy
authored
chore: autolinking, unlinking, disable android ci tests
* docs: add autolinking info * chore: disable failing android for now (haxm install fail silently)
1 parent c476354 commit abbd887

File tree

2 files changed

+46
-22
lines changed

2 files changed

+46
-22
lines changed

.circleci/config.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,60 +47,60 @@ save brew cache: &cache_save_brew
4747
paths:
4848
- /usr/local/Homebrew
4949
- ~/Library/Caches/Homebrew
50-
key: v1-brew-cache-{{ arch }}
50+
key: legacy-brew-cache-{{ arch }}
5151

5252
restore brew cache: &cache_restore_brew
5353
name: Restoring Brew cache
5454
keys:
55-
- v1-brew-cache-{{ arch }}
55+
- legacy-brew-cache-{{ arch }}
5656

5757
save brew cache for android: &cache_save_brew_android
5858
name: Saving Brew cache for android
5959
paths:
6060
- /usr/local/Homebrew
6161
- ~/Library/Caches/Homebrew
62-
key: v1-brew-cache-{{ arch }}-android
62+
key: legacy-brew-cache-{{ arch }}-android
6363

6464
restore brew cache for android: &cache_restore_brew_android
6565
name: Restoring Brew cache for android
6666
keys:
67-
- v1-brew-cache-{{ arch }}-android
67+
- legacy-brew-cache-{{ arch }}-android
6868

6969
# yarn
7070
save yarn cache: &cache_save_yarn
7171
name: Saving Yarn cache
7272
paths:
7373
- ~/.cache/yarn
7474
- ~/Library/Detox
75-
key: v1-yarn-cache-{{ checksum "package.json" }}-{{ arch }}
75+
key: legacy-yarn-cache-{{ checksum "package.json" }}-{{ arch }}
7676

7777
restore yarn cache: &cache_restore_yarn
7878
name: Restoring Yarn cache
7979
keys:
80-
- v1-yarn-cache-{{ checksum "package.json" }}-{{ arch }}
80+
- legacy-yarn-cache-{{ checksum "package.json" }}-{{ arch }}
8181

8282
# gradle
8383
save gradle wrapper cache: &cache_save_gradle_wrapper
8484
name: Saving Gradle Wrapper cache
8585
paths:
8686
- ~/.gradle/wrapper
87-
key: gradle-wrapper-v1-{{ checksum "example/android/gradle/wrapper/gradle-wrapper.properties" }}
87+
key: gradle-wrapper-legacy-{{ checksum "example/android/gradle/wrapper/gradle-wrapper.properties" }}
8888

8989
save gradle build cache: &cache_save_gradle_build
9090
name: Saving Gradle app/build cache
9191
paths:
9292
- ~/.gradle/caches
93-
key: app-build-gradle-v1-{{ checksum "example/android/app/build.gradle" }}
93+
key: app-build-gradle-legacy-{{ checksum "example/android/app/build.gradle" }}
9494

9595
restore gradle wrapper cache: &cache_restore_gradle_wrapper
9696
name: Restoring Gradle Wrapper cache
9797
keys:
98-
- gradle-wrapper-v1-{{ checksum "example/android/gradle/wrapper/gradle-wrapper.properties" }}
98+
- gradle-wrapper-legacy-{{ checksum "example/android/gradle/wrapper/gradle-wrapper.properties" }}
9999

100100
restore gradle build cache: &cache_restore_gradle_build
101101
name: Restoring Gradle app/build cache
102102
keys:
103-
- app-build-gradle-v1-{{ checksum "example/android/app/build.gradle" }}
103+
- app-build-gradle-legacy-{{ checksum "example/android/app/build.gradle" }}
104104

105105

106106
# ==============================
@@ -299,8 +299,8 @@ workflows:
299299
requires:
300300
- "Test: lint"
301301
- "Test: flow"
302-
- "Test: Android e2e":
303-
requires:
304-
- "Test: lint"
305-
- "Test: flow"
306-
- "Build: Android release apk"
302+
# - "Test: Android e2e":
303+
# requires:
304+
# - "Test: lint"
305+
# - "Test: flow"
306+
# - "Build: Android release apk"

README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,44 @@ An asynchronous, unencrypted, persistent, key-value storage system for React Nat
66
## Getting Started
77

88

9+
### Install
10+
911
```
10-
# Install
1112
$ yarn add @react-native-community/async-storage
13+
```
14+
15+
### Link
16+
17+
- **React Native 0.60+**
18+
19+
20+
[CLI autolink feature](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md) links the module while building the app.
21+
22+
23+
- **React Native <= 0.59**
1224

13-
# Link
25+
26+
```bash
1427
$ react-native link @react-native-community/async-storage
1528
```
1629

17-
See docs for [manual linking guide.](docs/Linking.md)
1830

19-
**Note:** For iOS project using `pods`, run:
20-
```
21-
$ cd ios/ && pod install
22-
```
31+
*Note* For `iOS` using `cocoapods`, run:
32+
33+
```bash
34+
$ cd ios/ && pod install
35+
```
36+
37+
See docs for [manual linking guide](docs/Linking.md)
38+
39+
### **Upgrading to React Native *0.60+***
40+
41+
New React Native comes with `autolinking` feature, which automatically links Native Modules in your project.
42+
In order to get it to work, make sure you `unlink` `Async Storage` first:
43+
44+
```bash
45+
$ react-native unlink @react-native-community/async-storage
46+
```
2347

2448

2549
## Usage

0 commit comments

Comments
 (0)