hyperledger-archives / indy-sdk-react-native

React Native wrapper around Indy SDK Java and Objective-C wrappers.
Apache License 2.0
22 stars 14 forks source link

Plugin with id 'maven' not found and compileSdkVersion is not specified #48

Closed dnaicker closed 2 years ago

dnaicker commented 2 years ago

I get the following errors after installing indy-sdk-react-native:

Plugin with id 'maven' not found. compileSdkVersion is not specified. Please add it to build.gradle

1: Task failed with an exception.

Build file 'C:\Users\denai\Github\ReactNativeTests\ReactNative\ReactNativeTest5\node_modules\indy-sdk-react-native\android\build.gradle' line: 39

==============================================================================

2: Task failed with an exception.

==============================================================================



It might be a gradle 7 issue whereby maven id is no longer supported. 

I tried to manually add a version for  compileSdkVersion but was not able to resolve
TimoGlastra commented 2 years ago

Which version of react native are you using? Is this a newly created project, or did you make modifications to the gradle version yourself? I've created a new project with indy-sdk-react-native with RN 0.68. Is this happening in 0.69?

dnaicker commented 2 years ago

Which version of react native are you using? Is this a newly created project, or did you make modifications to the gradle version yourself? I've created a new project with indy-sdk-react-native with RN 0.68. Is this happening in 0.69?

I used the version that came with the current react-native which is 0.69.1.

At some point I was tinkering with different gradle versions to see if I could overcome the maven id plugin error through earlier versions of gradle for that project.

I tried using 0.68 and uploaded the project to https://github.com/dnaicker/Aries-React-Native-Test. I get an error related to Postgres fs module not found when running npx run android

dnaicker commented 2 years ago

a colleague of mine updated the indy-sdk-react-native gradle file and it seems to run now: https://github.com/gmeiring-csir/ssi-basic/blob/master/copy/indy-sdk-react-native_build.gradle

I think he just changed plugin mavin to plugin mavin-publish which will work for gradle 7 and react native 0.69

TimoGlastra commented 2 years ago

Thanks for this @dnaicker, just ran into this myself. Have created a PR based on your changes and some issues I could find online. See here for the PR: https://github.com/hyperledger/indy-sdk-react-native/pull/49

Could you verify this works for you? Then I can merge the PR and create a new patch release

dnaicker commented 2 years ago

Thanks for this @dnaicker, just ran into this myself. Have created a PR based on your changes and some issues I could find online. See here for the PR: #49

Could you verify this works for you? Then I can merge the PR and create a new patch release

Thank you Timo! It works perfectly, I have added a review to PR.