Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Android 5.7.0 #548

Merged
merged 9 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
[![npm version](https://img.shields.io/npm/v/@adyen/react-native.svg?style=flat-square)](https://www.npmjs.com/package/@adyen/react-native)
[![Adyen iOS](https://img.shields.io/badge/ios-v5.11.0-brightgreen.svg)](https://github.com/Adyen/adyen-ios/releases/tag/5.11.0)
[![Adyen Android](https://img.shields.io/badge/android-v5.6.0-brightgreen.svg)](https://github.com/Adyen/adyen-android/releases/tag/5.6.0)
[![Adyen Android](https://img.shields.io/badge/android-v5.7.1-brightgreen.svg)](https://github.com/Adyen/adyen-android/releases/tag/5.7.1)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Adyen_adyen-react-native&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=Adyen_adyen-react-native)

> [!NOTE]
> Google will introduce new [target API level requirements for Google Play apps](https://support.google.com/googleplay/android-developer/answer/11926878?hl=en) starting August 31 2024.
> [!Note]
>
> For React-Native **73+** no action needed.
>
> For React-Native **72**:
> * update Android compileTarget to 34 in `android/build.gradle`
> * set `classpath("com.android.tools.build:gradle:8.1.4")` in `android/build.gradle`
> * enable `buildConfig` in `android/app/build.gradle` by adding `android.buildFeatures.buildConfig = true`
>
> For React-Native **before 72**:
> * update Android compileTarget to 34 in `android/build.gradle`


> For compatibility with officially unsupported versions below v0.74 check [this document](docs/Compatibility.md).

![React Native Logo](https://user-images.githubusercontent.com/2648655/198584674-f0c46e71-1c21-409f-857e-77acaa4daae0.png)

Expand Down
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ dependencies {
implementation "com.facebook.react:react-native:+"
implementation "com.google.code.gson:gson:$gson_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation("com.adyen.checkout:drop-in:$adyen_version") {
exclude group:'androidx.lifecycle'
}
implementation("com.adyen.checkout:drop-in:$adyen_version") {
exclude group:'androidx.lifecycle'
}
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"

//Tests
testImplementation testLibraries.json
testImplementation testLibraries.junit5
testImplementation testLibraries.mockito
}
}
2 changes: 1 addition & 1 deletion android/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ext {
jacoco_version = '0.8.12'

// Adyen Dependencies
adyen_version = "5.6.0"
adyen_version = "5.7.1"

// Android Dependencies
lifecycle_version = "2.7.0"
Expand Down
15 changes: 15 additions & 0 deletions docs/Compatibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## React-Native v0.73

* set `kotlin` in `node_modules/@react-native/gradle-plugin/gradle/libs.versions.toml` to at least **1.9.10**
* set `apiVersion` in `node_modules/@react-native/gradle-plugin/build.gradle.kts` to at least **1.7**

> [!NOTE]
> Google has introduced new [target API level requirements for Google Play apps](https://support.google.com/googleplay/android-developer/answer/11926878?hl=en) on August 31 2024.
> React-Native version **73** and below considered deprecated.

## React-Native v0.72 and below

* make sure your Java version is 17;
* update Android compileTarget to 34 in `android/build.gradle`;
* set `classpath("com.android.tools.build:gradle:8.1.4")` in `android/build.gradle`;
* enable `buildConfig` in `android/app/build.gradle` by adding `android.buildFeatures.buildConfig = true`.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class MainActivity : ReactActivity() {
AdyenCheckout.setLauncherActivity(this);
}

override fun onNewIntent(intent: Intent?) {
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
intent?.let { AdyenCheckout.handleIntent(it) };
intent.let { AdyenCheckout.handleIntent(it) };
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
Expand Down
Loading