Reputation: 67
I'm starting to build a native library for Expo Native Modules that integrates with an SDK which integrates with a Smart credit card payment terminal, and this SDK exposes various functions to communicate with the hardware of the device.
My question in this case would be how to add this dependency to my Native Module, where in the library's SDK Read Me, it asks to add the following lines to the build.gradle:
repositories {
...
maven {
url 'https://github.com/pagseguro/PlugPagServiceWrapper/raw/master'
}
}
implementation 'br.com.uol.pagseguro.plugpagservice.wrapper:wrapper:1.24.0'
However, by inserting these lines, when I build with npx expo run:android in the example, I get the following return in the terminal:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/home/bruno/projetos/native-modules/react-native-pagseguro-plugpag/android/build.gradle' line: 38
* What went wrong:
A problem occurred evaluating project ':react-native-pagseguro-plugpag'.
> Could not find method implementation() for arguments [com.pagseguro:plugpag-servicewrapper:1.24.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
How to solve this?
Here is the repository for the SDK mentioned above: https://github.com/pagseguro/pagseguro-sdk-plugpagservicewrapper
Upvotes: 3
Views: 602