Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are several changes I had to do before being able to work on Orgzly, so hopefully this makes it easier for other contributors to start.
flake.nix
Luckily a flake.nix was available, which turned out to be working for me with a few tweaks. The first issue is the manually imported nixpkgs which I was unable to turn off the unfree package error for (Android SDK), without modifying the file. This is because the neccessary environment variable for this can only be passed in impure nix mode. However unfree packages can be easily enabled with a single line addition.
Further on, the nixgl dependency seems to as well require an impure build, and I could not make it work on my system. I removed the nixgl dependency from the build because I am not sure why it is neccessary in the first place. Please tell me if this is an issue.
Additionally, I updated the flake dependencies to a recent version using "nix flake update".
This all combined now allows me to run "nix develop" to get into a shell that can successfully run "./gradlew assembleDebug" to build the APK without issues, which is very convenient.
.envrc
This allows to automatically load the flake environment when you change into the project directory, additionally it has a nice integration with Emacs as well. When direnv is installed and activated in a shell, it will query for permission to load the environment. This can also be disabled. The only minor downside in this being included is if somebody else uses a custom .envrc for some reason and has to take care of not commiting changes, however this seems to be standard pratice. Let me know if this is a problem.
.gitignore
These additions were neccessary to keep a clean working directory after running the Gradle build.
Tagging @colonelpanic8 as the original author of the flake build that was added recently. Let me know if there is an issue! Thank you for adding the flake, as building Orgzly was much easier with it than last time I tried 👍