diff --git a/.github/workflows/ios_tests.yml b/.github/workflows/ios_tests.yml index 1361f206..5580aaab 100644 --- a/.github/workflows/ios_tests.yml +++ b/.github/workflows/ios_tests.yml @@ -5,7 +5,7 @@ on: inputs: device-version: required: false - default: 14 + default: 15 type: number react-native-version: required: false diff --git a/README.md b/README.md index 577d7e22..de4b4f67 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/android/build.gradle b/android/build.gradle index c32b6ab6..fa236dee 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -102,9 +102,9 @@ 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" @@ -112,4 +112,4 @@ dependencies { testImplementation testLibraries.json testImplementation testLibraries.junit5 testImplementation testLibraries.mockito -} \ No newline at end of file +} diff --git a/android/dependencies.gradle b/android/dependencies.gradle index 075a0243..9b04e4a0 100644 --- a/android/dependencies.gradle +++ b/android/dependencies.gradle @@ -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" diff --git a/docs/Compatibility.md b/docs/Compatibility.md new file mode 100644 index 00000000..b3f6371a --- /dev/null +++ b/docs/Compatibility.md @@ -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`. diff --git a/example/android/app/src/main/java/com/adyenexample/MainActivity.kt b/example/android/app/src/main/java/com/adyenexample/MainActivity.kt index f229f395..5ef2ea4b 100644 --- a/example/android/app/src/main/java/com/adyenexample/MainActivity.kt +++ b/example/android/app/src/main/java/com/adyenexample/MainActivity.kt @@ -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?) {