Error in creating ios build in gradle version

Step: bundlerelease —
[19:41:17]: ---------------------------
[19:41:17]: ▸ Downloading https://services.gradle.org/distributions/gradle-7.4.2-all.zip
[19:41:20]: ▸ …10%…20%…30%…40%…50%…60%…70%…80%…90%…100%
[19:41:23]: ▸ Welcome to Gradle 7.4.2!
[19:41:23]: ▸ Here are the highlights of this release:
[19:41:23]: ▸ - Aggregated test and JaCoCo reports
[19:41:23]: ▸ - Marking additional test source directories as tests in IntelliJ
[19:41:23]: ▸ - Support for Adoptium JDKs in Java toolchains
[19:41:23]: ▸ For more details see Gradle 7.4.2 Release Notes
[19:41:23]: ▸ Starting a Gradle Daemon (subsequent builds will be faster)
[19:41:52]: ▸ > Configure project :app
[19:41:52]: ▸ WARNING:Using flatDir should be avoided because it doesn’t support any meta-data formats.
[19:41:52]: ▸ FAILURE: Build failed with an exception.
[19:41:52]: ▸ * Where:
[19:41:52]: ▸ Script ‘/builds/ourlastmsg/olam-app/olamApp/node_modules/card.io.cordova.mobilesdk/src/android/build.gradle’ line: 6
[19:41:52]: ▸ * What went wrong:
[19:41:52]: ▸ A problem occurred evaluating script.
[19:41:52]: ▸ > Could not find method compile() for arguments [io.card:android-sdk:5.4.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
[19:41:52]: ▸ * Try:
[19:41:52]: ▸ > Run with --stacktrace option to get the stack trace.
[19:41:52]: ▸ > Run with --info or --debug option to get more log output.
[19:41:52]: ▸ > Run with --scan to get full insights.
[19:41:52]: ▸ * Get more help at https://help.gradle.org
[19:41:52]: ▸ BUILD FAILED in 34s
[19:41:52]: -------------------------
[19:41:52]: — Step: upload_logs —
[19:41:52]: -------------------------
[19:42:02]: Unable to upload package list log. Skipping.
±---------------------------±-----------------------------------------------------+
| Lane Context |
±---------------------------±-----------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | android |
| LANE_NAME | android build_capacitor |
| DOWNLOAD_CREDENTIAL_EXISTS | true |
| DOWNLOAD_CREDENTIAL_PATH | /builds/ourlastmsg/olam-app/olamApp/android.keystore |
| DOWNLOAD_CREDENTIAL_ALIAS | olam |
| IONIC_CLI_VERSION | 6.20.3 |
| NODE_PACKAGE_MANAGER | npm |
| PROJECT_WEB_DIR | www |
| GRADLE_BUILD_TYPE | release |
±---------------------------±-----------------------------------------------------+
[19:42:05]: Shell command exited with exit status 1 instead of 0.
Downloading https://services.gradle.org/distributions/gradle-7.4.2-all.zip
…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%

Welcome to Gradle 7.4.2!

Here are the highlights of this release:

  • Aggregated test and JaCoCo reports
  • Marking additional test source directories as tests in IntelliJ
  • Support for Adoptium JDKs in Java toolchains

For more details see Gradle 7.4.2 Release Notes

Starting a Gradle Daemon (subsequent builds will be faster)

Configure project :app
WARNING:Using flatDir should be avoided because it doesn’t support any meta-data formats.

FAILURE: Build failed with an exception.

  • Where:
    Script ‘/builds/ourlastmsg/olam-app/olamApp/node_modules/card.io.cordova.mobilesdk/src/android/build.gradle’ line: 6

  • What went wrong:
    A problem occurred evaluating script.

Could not find method compile() for arguments [io.card:android-sdk:5.4.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 34s

±-----±------------------------±------------+
| fastlane summary |
±-----±------------------------±------------+
| Step | Action | Time (in s) |
±-----±------------------------±------------+
| 1 | add_extra_platforms | 0 |
| 2 | default_platform | 0 |
| 3 | begin_building | 0 |
| 4 | build_summary | 1 |
| 5 | download_credential | 0 |
| 6 | set_ionic_cli | 3 |
| 7 | detect_package_manager | 0 |
| 8 | add_git_credentials | 0 |
| 9 | get_appflow_config | 0 |
| 10 | dependency_install | 98 |
| 11 | create_capacitor_config | 0 |
| 12 | get_web_dir | 0 |
| 13 | modify_cap_web_config | 0 |
| 14 | set_java_home | 0 |
| 15 | build_pro_app | 228 |
| 16 | cap_sync | 2 |
| 17 | cap_custom_deploy | 0 |
| 18 | modify_gradle_config | 0 |
| :boom: | bundlerelease | 35 |
| 20 | upload_logs | 12 |
±-----±------------------------±------------+

[19:42:05]: fastlane finished with errors
/usr/local/bundle/bin/fastlane: [!] Shell command exited with exit status 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
Downloading https://services.gradle.org/distributions/gradle-7.4.2-all.zip
…10%…20%…30%…40%…50%…60%…70%…80%…90%…100%

Welcome to Gradle 7.4.2!

Here are the highlights of this release:

  • Aggregated test and JaCoCo reports
  • Marking additional test source directories as tests in IntelliJ
  • Support for Adoptium JDKs in Java toolchains

For more details see Gradle 7.4.2 Release Notes

Starting a Gradle Daemon (subsequent builds will be faster)

Configure project :app
WARNING:Using flatDir should be avoided because it doesn’t support any meta-data formats.

FAILURE: Build failed with an exception.

  • Where:
    Script ‘/builds/ourlastmsg/olam-app/olamApp/node_modules/card.io.cordova.mobilesdk/src/android/build.gradle’ line: 6

  • What went wrong:
    A problem occurred evaluating script.

Could not find method compile() for arguments [io.card:android-sdk:5.4.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 34s

Running after_script
Running after script…
$ run “clean-up”

gradle deprecated the compile keyword long ago and removed it later on, and the version being used doesn’t understand it since it was removed.

You should find the plugin that is adding the io.card:android-sdk dependency and change compile with implementation