Pathes are always ../nitrogen
Hey there I noticed that all pathes from nitrogen starts always with ../nitrogen. When using nitro modules in an existing app rather than as standalone library Your build.gradle an CMakeLists.txt is located under android/app/. So nitrogen is under ../../nitrogen.
Is there anyway to prevent this?
I mean - is that a problem? You can move your nitro.json to any folder you'd like.
But I do have a --out parameter in Nitrogen CLI - that allows you to choose a different location for the nitrogen/ folder.
The CMakeLists extension will still have a ../nitrogen relative path tho because I don't know where your gradle project is - the assumption is that it's one level deeper.
No don't get me wrong I like that the nitrogen folder is at the root. But the build.gradle as well as the CMakeLists.txt is located under android/app and the generated Cmake file from nitrogen references the files with ../nitrogen.
So I have to manually change the path to ../../nitrogen, if I want to use nitro modules in a non library scenario.
Makes sense. Hm
So any chance to get a workaround for this?
This not only makes sense, it especially makes sense. All guides on how to write a React Native module instruct me to create a single Gradle project, but none of them can be individually imported into Android Studio because they fail at the step apply plugin: "com.facebook.react". This seems to require includeBuild @react-native/gradle-plugin in settings.gradle to work properly, but it's supposed to be a single Gradle project. I don't understand how others write Android native code without using Android Studio at all - this should be the development approach with the least friction.
I'm a beginner, and I really hope I'm completely wrong here—so someone can tell me the right way to do this.
You need to use it from an example app, not open the gradle project of the library directly @fightingcat