Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,6 @@ npm install @react-native-async-storage/async-storage
yarn add @react-native-async-storage/async-storage
```

### Android

Inside your `android/build.gradle(.kts)` file, add link to local maven repo:

```groovy
allprojects {
repositories {
// ... others like google(), mavenCentral()

maven {
url = uri(project(":react-native-async-storage_async-storage").file("local_repo"))
// or uri("path/to/node_modules/@react-native-async-storage/async-storage/android/local_repo")
}
}
}
```

### iOS/macOS

Install cocoapods dependencies:
Expand Down
15 changes: 1 addition & 14 deletions docs/migration-to-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,7 @@ Other components:

### Installation changes

Android requires a local Maven repository to be added to your `android/build.gradle(.kts)`:

```groovy
allprojects {
repositories {
// ... others like google(), mavenCentral()

maven {
url = uri(project(":react-native-async-storage_async-storage").file("local_repo"))
// or uri("path/to/node_modules/@react-native-async-storage/async-storage/android/local_repo")
}
}
}
```
No additional Android setup is required — the local Maven repository for `shared-storage` is configured automatically by the library's `build.gradle`.

### `AsyncStorage` is now instance-based

Expand Down
3 changes: 0 additions & 3 deletions examples/react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,5 @@ allprojects {
}()
mavenCentral()
google()
maven {
url = uri(project(":react-native-async-storage_async-storage").file("local_repo"))
}
}
}
11 changes: 11 additions & 0 deletions packages/async-storage/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,21 @@ android {
}

repositories {
maven {
url("${project.projectDir}/local_repo")
}
mavenCentral()
google()
}

rootProject.allprojects {
repositories {
maven {
url("${rootDir}/../node_modules/@react-native-async-storage/async-storage/android/local_repo")
}
}
}

dependencies {
implementation "com.facebook.react:react-android"
api "org.asyncstorage.shared_storage:storage-android:1.0.0"
Expand Down