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

Patched to work with cordova@10.0.0 #13

Merged
merged 14 commits into from
Jul 30, 2021

Conversation

iMrDJAi
Copy link
Contributor

@iMrDJAi iMrDJAi commented Mar 27, 2021

Tested with cordova@10.0.0 and cordova-android@9.0.0, It works fine!
Fix suggested by @staltz (JaneaSystems/nodejs-mobile#239 (comment))
Edit: I also updated cordova-ios to version 6.2.0 to fix a compatibility issue with cordova@10.0.0, then I added some github actions tests to the project.

@iMrDJAi iMrDJAi changed the title Patched to work with cordova-android@9.0.0 Patched to work with cordova-android@9.0.0 and cordova-ios@6.2.0 Apr 9, 2021
@romuloalves
Copy link

romuloalves commented Apr 10, 2021

There are some inputs.file and outputs.file that should be inputs.dir and outputs.dir in src/android/build.gradle. I found that the nodejs-mobile-react-native contains the right configs.
Even changing that I couldn't make it work but I think it's something related to my project and native modules.
Let me know if someone couldn't try this changes.

cc: @iMrDJAi

@iMrDJAi
Copy link
Contributor Author

iMrDJAi commented Apr 11, 2021

@romuloalves Not sure about that, the only what I found necessary to include there are the libnode.so files:

    packagingOptions {
        pickFirst 'lib/x86/libnode.so'
        pickFirst 'lib/armeabi-v7a/libnode.so'
        pickFirst 'lib/arm64-v8a/libnode.so'
        pickFirst 'lib/x86_64/libnode.so'
    }

If you get an error while building your project post it and I'll see.

@romuloalves
Copy link

@iMrDJAi
The error was Cannot write to file '' specified for property '$1' as it is a directory..
It was in the step BuildNpmModules${abi_name}.

I found out this line (taking from your PR):

227 outputs.file "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/nodejs-project/"

I changed this one and lines 220 and 273 too.
They're in this way here: https://github.com/JaneaSystems/nodejs-mobile-react-native/blob/unstable/android/build.gradle#L373

@iMrDJAi
Copy link
Contributor Author

iMrDJAi commented Apr 11, 2021

@iMrDJAi
The error was Cannot write to file '' specified for property '$1' as it is a directory..
It was in the step BuildNpmModules${abi_name}.

I found out this line (taking from your PR):

227 outputs.file "${rootProject.buildDir}/nodejs-native-assets-temp-build/nodejs-native-assets-${abi_name}/nodejs-project/"

I changed this one and lines 220 and 273 too.
They're in this way here: https://github.com/JaneaSystems/nodejs-mobile-react-native/blob/unstable/android/build.gradle#L373

@romuloalves Before doing anything further, try doing a fresh build. Recreate your project again, make sure to update everything, check you Cordova version..
You said it may be your project, there are breaking changes made to Cordova, you can't simply upgrade or change your version with no issues.
If that's not the deal, can you please provide me info about how did you setup your project?

@iMrDJAi iMrDJAi changed the title Patched to work with cordova-android@9.0.0 and cordova-ios@6.2.0 Patched to work with cordova@10.0.0 May 2, 2021
Copy link
Member

@jaimecbernardo jaimecbernardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks a lot for the contribution and sorry for taking so long to get back to you.

@jaimecbernardo jaimecbernardo merged commit 80ba48c into JaneaSystems:unstable Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants