Skip to content

Conversation

@edusperoni
Copy link
Collaborator

instead of writing the generated .aar into the plugin's node_modules folder, write it to platforms/android/.plugins. This prevents us from modifying node_modules

@edusperoni
Copy link
Collaborator Author

@farfromrefug

@farfromrefug
Copy link
Contributor

@edusperoni I like the idea! it will break plugins though.
right now plugins having dependency on other plugins (or widget-release) had to had direct dependency on the jar. and we had to use it with path to the node modules folder.

actually what you are doing could make things simpler if the plugins folder is added to dependencies repositories.
then i could simply add the jar name as a dép and it should be found

@edusperoni
Copy link
Collaborator Author

I don't believe that would change? We still use what's inside the node_modules, but when we generate the aar we put the artifact in the platforms folder. Do you think that wouldn't work?

@farfromrefug
Copy link
Contributor

@edusperoni if i understand the output aar is now in platforms/android/plugins instead of in each node_modules/{plugin}/platforms/android ?
If so my plugins need an update. Here is an example https://github.com/nativescript-community/gesturehandler/blob/master/packages/gesturehandler/platforms/android/include.gradle#L21

@edusperoni
Copy link
Collaborator Author

I believe the include.gradle is still parsed in the node modules folder. IRRC it's not a real Gradle file (doesn't get included in full). The decencies are parsed only.

@edusperoni
Copy link
Collaborator Author

Oh, I see. You're depending on the final artifact. Maybe I'll add some helper functions (some are already present) for plugin developers like getJSDir(dep), getNativeDir(dep) and getDistNativeDir(dep) and accompanying ones for getting the dependencies recursively. This way if we decide to make the native dir fully mirrored inside the platforms dir we can just return a different value for the getNativeDir()

@farfromrefug
Copy link
Contributor

@edusperoni yes that would be awesome.
ABout the The decencies are parsed only. i hope this will be fixed soon as it is part of this #5774. In it now the include.gradle is actually included

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